Skip to content

Commit

Permalink
ci: try to make unique run of checks and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed May 30, 2024
1 parent 0b6eeb8 commit cfc1256
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
paths:
- "src/**/**.rs"

# cancel in-progress runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
check-fmt:
runs-on: ubuntu-22.04
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ on:
- "Cargo.lock"
- "rust-toolchain.toml"

# cancel in-progress runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: checks
run: |
cargo fmt --all --check
uses: .github/workflows/checks.yml

deploy:
needs: [check]
Expand Down

0 comments on commit cfc1256

Please sign in to comment.