Merge pull request #2571 from scpwiki/dependabot/cargo/wws/clap-4.5.50 #283
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: '[wws] Rust' | |
| on: | |
| pull_request: | |
| paths: | |
| - 'wws/Cargo.toml' | |
| - 'wws/Cargo.lock' | |
| - 'wws/src/**' | |
| - '.github/workflows/wws.yaml' | |
| push: | |
| branches: | |
| - develop | |
| - prod | |
| jobs: | |
| binary_build_and_test: | |
| name: Executable | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTFLAGS: -D warnings | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Rust Toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Cargo Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| wws/target | |
| key: ${{ runner.os }}-wws-default-${{ hashFiles('wws/**/Cargo.toml') }} | |
| - name: Build | |
| run: cd wws && cargo build | |
| - name: Test | |
| run: cd wws && cargo test --all-features -- --nocapture --test-threads 1 | |
| clippy_lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTFLAGS: -D warnings | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Rust Toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| components: rustfmt, clippy | |
| - name: Cargo Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| wws/target | |
| key: ${{ runner.os }}-wws-lint-${{ hashFiles('wws/**/Cargo.toml') }} | |
| - name: Rustfmt | |
| run: cd wws && cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cd wws && cargo clippy --no-deps |