Lock file maintenance (#105) #484
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: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -D warnings | |
| jobs: | |
| test: | |
| name: Rust ${{ matrix.channel }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| channel: [ stable, beta, nightly ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust ${{ matrix.channel }} | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.channel }} | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| cache-bin: false | |
| - name: Install cargo-hack | |
| uses: taiki-e/install-action@cargo-hack | |
| - name: Check powerset | |
| run: cargo hack check --feature-powerset --optional-deps | |
| - name: Run tests | |
| run: cargo hack test --workspace --feature-powerset --optional-deps | |
| - name: Run clippy | |
| run: cargo clippy | |
| publish_dry_run: | |
| name: Publish dry run | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Publish dry run | |
| run: cargo publish --package inno --dry-run | |
| msrv: | |
| name: MSRV | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install cargo-msrv | |
| uses: moonrepo/setup-rust@v1 | |
| with: | |
| bins: cargo-hack, cargo-msrv | |
| - name: Verify MSRV | |
| id: verify | |
| run: cargo hack --workspace msrv verify | |
| - name: Find actual MSRV | |
| if: ${{ failure() && steps.verify.conclusion == 'failure' }} | |
| run: cargo hack --workspace msrv find | |
| minimal_versions: | |
| name: Minimal dependency versions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| cache-bin: false | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-hack,cargo-minimal-versions | |
| - name: Add nightly Rust toolchain | |
| run: rustup toolchain add nightly --profile minimal --no-self-update | |
| - name: Check minimal versions | |
| run: cargo minimal-versions check --workspace | |
| unused_dependencies: | |
| name: Unused dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Check for unused dependencies | |
| uses: bnjbvr/cargo-machete@main |