Skip to content

Commit 353cd50

Browse files
committed
Adjust tox workflow for improved integration
- Remove `fail-fast: false` to allow failing checks to cancel others. This is to avoid unnecessary usage and wait times. It may be necessary to undo this temporarily again in the future when investigating failures, for failures that happen due to external changes rather than to a `subaudit` code change. - Add a "collector" job that depends on all the jobs generated by the `tox` matrix job definition, so the individual jobs don't have to be added as required checks for branch protection. Instead, the name "All tox checks pass" has been added. This is based indirectly on the `test-pass` job in `gitoxide`, which was introduced in GitoxideLabs/gitoxide#1551 by https://github.com/NobodyXu. It is more specifically based on my adaptation of that in `algorithms-python` introduced in EliahKagan/algorithms-python#234. This is a common pattern, so it does not necessarily resemble the code in `gitoxide` more than it does that pattern elsewhere, and it is simpler than the version in `algorithms-python`. See: EliahKagan/algorithms-python@60d2d4e
1 parent ac7754b commit 353cd50

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/tox.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ jobs:
112112
include:
113113
- experimental: false
114114

115-
fail-fast: false
116-
117115
continue-on-error: ${{ matrix.experimental }}
118116

119117
runs-on: ${{ matrix.os }}
@@ -139,3 +137,21 @@ jobs:
139137

140138
- name: Check with tox
141139
run: tox
140+
141+
all-pass:
142+
name: All tox checks pass
143+
144+
needs:
145+
- tox
146+
147+
runs-on: ubuntu-latest
148+
149+
steps:
150+
- name: Some failed
151+
if: contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'failure')
152+
run: |
153+
false
154+
155+
- name: All passed
156+
run: |
157+
true

0 commit comments

Comments
 (0)