diff --git a/.github/workflows/cI.yml b/.github/workflows/cI.yml index 000d91f..03d76e0 100644 --- a/.github/workflows/cI.yml +++ b/.github/workflows/cI.yml @@ -3,8 +3,12 @@ name: Continuous Integration on: push: branches: - - master + - main pull_request: + - "**" + workflow_dispatch: + branches: + - "**" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -17,11 +21,11 @@ jobs: clippy: runs-on: ubuntu-latest timeout-minutes: 10 + if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly-2024-02-01 components: clippy - uses: Swatinem/rust-cache@v2 with: @@ -33,22 +37,22 @@ jobs: rustfmt: runs-on: ubuntu-latest timeout-minutes: 10 + if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly-2024-02-01 components: rustfmt - run: cargo fmt --all --check test: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 10 + if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly-2024-02-01 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true