fix: refresh in-progress workflow handling #11
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: build | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".github/workflows/build.yml" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "src/**" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - ".github/workflows/build.yml" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "src/**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| cargo-build: | |
| name: Cargo Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch Repository | |
| uses: actions/checkout@v6 | |
| - name: Install stable toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: cargo build | |
| run: | | |
| cargo build --workspace --all-targets --all-features | |
| cargo test | |
| cargo-fmt: | |
| name: Cargo fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch Repository | |
| uses: actions/checkout@v6 | |
| - name: Install stable toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: rustfmt | |
| - name: Rustfmt Check | |
| run: cargo fmt --all --check | |
| cargo-clippy: | |
| name: Cargo clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch Repository | |
| uses: actions/checkout@v6 | |
| - name: Install stable toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| - name: Clippy Check | |
| run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings |