File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 branches : [main]
99 merge_group :
1010
11- # Ensures that only one workflow task will run at a time. Previous builds, if
12- # already in process, will get cancelled. Only the latest commit will be allowed
13- # to run, cancelling any workflows in between
11+ # Cancel obsolete test runs after new commits. Unrelated label events use a
12+ # separate group so they cannot cancel the required unit test run.
1413concurrency :
15- group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+ group : >-
15+ ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-${{
16+ github.event.action == 'labeled' &&
17+ github.event.label.name != 'A-release' &&
18+ 'ignored-label' ||
19+ 'required'
20+ }}
1621 cancel-in-progress : true
1722
1823permissions :
@@ -98,6 +103,14 @@ jobs:
98103 run : cargo nextest run --profile check-no-git-dependencies --locked --run-ignored=only
99104
100105 unit-tests :
106+ # Keep skipped unrelated-label runs from replacing the required check.
107+ name : >-
108+ ${{
109+ github.event.action == 'labeled' &&
110+ github.event.label.name != 'A-release' &&
111+ 'Label does not require unit tests' ||
112+ 'unit-tests'
113+ }}
101114 runs-on : ubuntu-latest
102115 if : >-
103116 always() &&
You can’t perform that action at this time.
0 commit comments