File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,24 +55,31 @@ jobs:
5555 export NOX_DEFAULT_VENV_BACKEND=uv
5656 export UV_PRERELEASE=allow
5757
58- # We use xargs -P 4 to run tests in parallel on the standard runner.
59- # We redirect output to a file first so the GitHub UI logs don't interleave and become unreadable.
60- echo "${{ needs.discover.outputs.packages }}" | tr ' ' '\n' | xargs -n 1 -P 4 -I {} sh -c '
58+ # Dropped -n 1 to fix the xargs warning.
59+ echo "${{ needs.discover.outputs.packages }}" | tr ' ' '\n' | xargs -P 4 -I {} sh -c '
6160 if [ -f "{}/noxfile.py" ]; then
6261 cd {}
6362
6463 # Run test and capture output
6564 uvx --with "nox[uv]" nox -s "unit-${{ matrix.python }}" > nox_output.log 2>&1
6665 STATUS=$?
6766
68- # Print cleanly to GitHub UI
69- echo "::group::Testing {}"
67+ # Print output cleanly inside a GitHub group
68+ echo "::group::Testing {} (Python ${{ matrix.python }}) "
7069 cat nox_output.log
71- echo "::endgroup::"
7270
73- # If the test failed, exit with failure so GitHub catches it
7471 if [ $STATUS -ne 0 ]; then
75- exit 255
72+ # Check if it failed just because the Python version isn"t supported by this package
73+ if grep -q "Sessions not found:" nox_output.log; then
74+ echo "⏭️ Session unit-${{ matrix.python }} is not defined for this package. Safely skipping."
75+ else
76+ echo "❌ Tests failed in {}!"
77+ echo "::endgroup::"
78+ # Exit 1 allows other packages to finish testing, but ensures the workflow fails
79+ exit 1
80+ fi
7681 fi
82+
83+ echo "::endgroup::"
7784 fi
7885 '
You can’t perform that action at this time.
0 commit comments