Repository navigation
Switch to trusted publishing and rename default branch to main
#40
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| env: | |
| RUSTFLAGS: "-Dwarnings" | |
| RUSTDOCFLAGS: "-Dwarnings" | |
| jobs: | |
| test: | |
| name: Test | |
| strategy: | |
| matrix: | |
| os: [windows-2025, ubuntu-24.04, macos-15] | |
| rust: [stable, nightly] | |
| include: | |
| - os: ubuntu-24.04 | |
| rust: beta | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Rust | |
| run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - run: cargo test | |
| - run: cargo test --no-default-features | |
| doc_fmt: | |
| name: Document and check formatting | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Rust | |
| run: | | |
| rustup update nightly | |
| rustup default nightly | |
| rustup component add rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo doc | |
| - run: cargo fmt --check | |
| msrv: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Rust | |
| run: | | |
| msrv="$(cargo metadata --format-version=1 | | |
| jq -r '.packages[] | select(.name == "getopts").rust_version' | |
| )" | |
| rustup update "$msrv" && rustup default "$msrv" | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo check |