Skip to content

Commit 8bf4517

Browse files
committed
Fix various problems in the new job
- Check the specific step outcome (and specifically the outcome, not the conclusion which is turned into `success` by the value of `continue-on-error`). Without this, the last step never runs, so the test does not fail when it is supposed to. - Give the last step a fixed (literal) name, since the `env` key does not interpolate into its name like a `matrix` value would. Accordingly, move the `env` key into the step, since it is now only used inside its logic. - Line-buffer standard output for the `cargo nextest` command for more immedate (less staggered) output. This may not happen automatically since its stdout is a pipe. (I think its stderr is already either unbuffered or line-buffered even when not a terminal.)
1 parent 0d1173f commit 8bf4517

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ jobs:
8282

8383
test-fixtures-windows:
8484
runs-on: windows-latest
85-
env:
86-
# FIXME: Change to 15 after verifying that the last step can fail.
87-
# See https://github.com/GitoxideLabs/gitoxide/issues/1358.
88-
EXPECTED_FAILURE_COUNT: 13
8985
defaults:
9086
run:
9187
shell: bash # Includes `-o pipefail`.
@@ -97,13 +93,19 @@ jobs:
9793
with:
9894
tool: nextest
9995
- name: "Test (nextest)"
96+
id: nextest
10097
env:
10198
GIX_TEST_IGNORE_ARCHIVES: 1
10299
run: |
103-
cargo nextest --color=always run --workspace --no-fail-fast |& tee nextest.log
100+
stdbuf -oL -- cargo nextest --color=always run --workspace --no-fail-fast |&
101+
tee nextest.log
104102
continue-on-error: true
105-
- name: Allow up to ${{ env.EXPECTED_FAILURE_COUNT }} failures
106-
if: failure()
103+
- name: Check how many tests failed
104+
if: steps.nextest.outcome == 'failure'
105+
env:
106+
# FIXME: Change to 15 after verifying that the last step can fail.
107+
# See https://github.com/GitoxideLabs/gitoxide/issues/1358.
108+
EXPECTED_FAILURE_COUNT: 13
107109
run: |
108110
set -x
109111
sed -Ei 's/\x1B\[[[:digit:];]*m//g' nextest.log # Remove ANSI color codes.

0 commit comments

Comments
 (0)