Skip to content

Commit

Permalink
Add Windows CI job with GIX_TEST_IGNORE_ARCHIVES=1
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
EliahKagan committed Nov 7, 2024
1 parent c5955fc commit 0d1173f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,37 @@ jobs:
- name: Check that tracked archives are up to date
run: git diff --exit-code # If this fails, the fix is usually to commit a regenerated archive.

test-fixtures-windows:
runs-on: windows-latest
env:
# FIXME: Change to 15 after verifying that the last step can fail.
# See https://github.com/GitoxideLabs/gitoxide/issues/1358.
EXPECTED_FAILURE_COUNT: 13
defaults:
run:
shell: bash # Includes `-o pipefail`.
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: nextest
- name: "Test (nextest)"
env:
GIX_TEST_IGNORE_ARCHIVES: 1
run: |
cargo nextest --color=always run --workspace --no-fail-fast |& tee nextest.log
continue-on-error: true
- name: Allow up to ${{ env.EXPECTED_FAILURE_COUNT }} failures
if: failure()
run: |
set -x
sed -Ei 's/\x1B\[[[:digit:];]*m//g' nextest.log # Remove ANSI color codes.
pattern='\n-{10,}\r?\n[ \t]+Summary\b[^\n]+[ \t]\K\d+(?= failed\b)'
count="$(grep -zoP "$pattern" nextest.log)"
((count <= EXPECTED_FAILURE_COUNT))
test-32bit:
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit 0d1173f

Please sign in to comment.