Skip to content

Commit

Permalink
chore: reduce ci usage
Browse files Browse the repository at this point in the history
This should help reduce the CI usage by:

1. Only running  CI on either:

   - PRs targetting `master`
   - pushes to `master`

   Most importantly, CI is no longer doubled in PRs (as previously,
   `push` and `pull_request` would _both_ be triggered).

2. Cancelling existing runs if a new commit is added

Signed-off-by: JP-Ellis <[email protected]>
  • Loading branch information
JP-Ellis committed Dec 11, 2024
1 parent 273f17c commit 7ff83a7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build-ffi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Pact-Rust FFI Build

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Pact-Rust Build

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
Expand Down Expand Up @@ -55,4 +65,3 @@ jobs:
- uses: actions/checkout@v3
- run: cargo check --no-default-features
working-directory: rust

12 changes: 11 additions & 1 deletion .github/workflows/compatability-suite.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Pact-Rust Compatibility Suite

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

env:
pact_do_not_track: true
Expand Down

0 comments on commit 7ff83a7

Please sign in to comment.