Use typed-path to read UTF-8 Windows paths
#214
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: Cargo Build & Test | |
| on: | |
| push: | |
| paths: | |
| - .github/workflows/build.yml | |
| - assets/** | |
| - src/** | |
| - Cargo.toml | |
| - Cargo.lock | |
| - build.rs | |
| pull_request: | |
| paths: | |
| - .github/workflows/build.yml | |
| - assets/** | |
| - src/** | |
| - Cargo.toml | |
| - Cargo.lock | |
| - build.rs | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build_and_test: | |
| name: Rust project - latest | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| runs-on: ${{ matrix.os }} | |
| 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' }} | |
| - name: Check | |
| run: cargo check | |
| - name: Test | |
| run: cargo test | |
| clippy: | |
| name: Cargo clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Run clippy | |
| run: cargo clippy | |
| env: | |
| RUSTFLAGS: "-D warnings" | |
| 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 --dry-run --no-verify | |
| msrv: | |
| name: MSRV | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| cache-bin: false | |
| - name: Install cargo-msrv | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-msrv | |
| - name: Verify MSRV | |
| id: verify | |
| run: cargo msrv verify | |
| - name: Find actual MSRV | |
| if: ${{ failure() && steps.verify.conclusion == 'failure' }} | |
| run: cargo msrv find | |
| 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 |