Skip to content

Commit 0d1173f

Browse files
committed
Add Windows CI job with GIX_TEST_IGNORE_ARCHIVES=1
Some of these fail. We report the step as failing if any fail, which currently at least 14 and usually 15 are expected to (one of them is a performance test). If more than 15 fail, we'll fail this job, which will fail the workflow overall, but the job is still deliberately not treated as a required check for PR auto-merge. Right now, the expected number of failures is delibreately set too low, to 13, which is unlikely to be satisfied. This is just to test the new job. After verifying that it can trigger job failure when an excessive number of test case failures occurs, and fixing any readily apparent bugs in the job definition, this value will be raised, probably to 15. See GitoxideLabs#1358 for information on the known-failing tests on Windows with `GIX_TEST_IGNORE_ARCHIVES=1`.
1 parent c5955fc commit 0d1173f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,37 @@ jobs:
8080
- name: Check that tracked archives are up to date
8181
run: git diff --exit-code # If this fails, the fix is usually to commit a regenerated archive.
8282

83+
test-fixtures-windows:
84+
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
89+
defaults:
90+
run:
91+
shell: bash # Includes `-o pipefail`.
92+
steps:
93+
- uses: actions/checkout@v4
94+
- uses: dtolnay/rust-toolchain@stable
95+
- uses: Swatinem/rust-cache@v2
96+
- uses: taiki-e/install-action@v2
97+
with:
98+
tool: nextest
99+
- name: "Test (nextest)"
100+
env:
101+
GIX_TEST_IGNORE_ARCHIVES: 1
102+
run: |
103+
cargo nextest --color=always run --workspace --no-fail-fast |& tee nextest.log
104+
continue-on-error: true
105+
- name: Allow up to ${{ env.EXPECTED_FAILURE_COUNT }} failures
106+
if: failure()
107+
run: |
108+
set -x
109+
sed -Ei 's/\x1B\[[[:digit:];]*m//g' nextest.log # Remove ANSI color codes.
110+
pattern='\n-{10,}\r?\n[ \t]+Summary\b[^\n]+[ \t]\K\d+(?= failed\b)'
111+
count="$(grep -zoP "$pattern" nextest.log)"
112+
((count <= EXPECTED_FAILURE_COUNT))
113+
83114
test-32bit:
84115
runs-on: ubuntu-latest
85116
strategy:

0 commit comments

Comments
 (0)