-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: reduce ci usage #480
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3100910
chore(ci): reduce ci usage
JP-Ellis eb0df9a
chore(ci): combine compatibility suite tests
JP-Ellis d72589b
chore(ci): make more use of nextest
JP-Ellis 4018545
chore(ci): use github runner's native container integration
JP-Ellis 0856baa
chore(ci): consolidate envs
JP-Ellis c459bd5
chore(ci): consoldate rust-toolchain calls
JP-Ellis f80cf9f
chore(ci): add rust caching
JP-Ellis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,44 @@ | ||
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 | ||
RUST_BACKTRACE: "1" | ||
RUST_LOG: "debug" | ||
PACT_DO_NOT_TRACK: "true" | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
v1: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ ubuntu-latest, windows-latest, macos-13, macos-14 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Run Cucumber | ||
run: cargo test --test v1* | ||
working-directory: compatibility-suite | ||
v2: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ ubuntu-latest, windows-latest, macos-13, macos-14 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Run Cucumber | ||
run: cargo test --test v2* | ||
working-directory: compatibility-suite | ||
v3: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ ubuntu-latest, windows-latest, macos-13, macos-14 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Run Cucumber | ||
run: cargo test --test v3* | ||
working-directory: compatibility-suite | ||
v4: | ||
compatibility-suite: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ ubuntu-latest, windows-latest, macos-13, macos-14 ] | ||
operating-system: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
rust | ||
compatibility-suite | ||
shared-key: ${{ runner.os }} | ||
- name: Run Cucumber | ||
run: cargo test --test v4* | ||
# Note: cucumber's test executables are incompatible with nextest | ||
# See: https://github.com/nextest-rs/nextest/issues/1329 | ||
run: cargo test | ||
working-directory: compatibility-suite |
This file contains 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove that, that would be annoying. Imagine waiting for a build, then someone else pushes a commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concurrency group is per-PR, or per branch in the case of a
push
trigger (which would only happen in master).So two PRs can have CI running concurrently with no issue; and if two PRs merge in quick succession, the second merge will cancel the first. But once merged, there shouldn't be any waiting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there should not be a case of waiting for a build, and it being canceled by someone else's push except if you are both working on the same PR.
If you want this to run specifically when creating tagged released, I recommend creating a separate trigger for tags.