Skip to content

Commit c32b8e9

Browse files
Keep the commit check green while Python 3.15 can't install
continue-on-error on the 3.15 jobs kept the run passing, but each job still counted as a failed check, so the commit showed a red X. The 3.15 steps are now allowed to fail instead, which leaves the job green with the failure in its log, and the steps after the install skip until it works. The jobs are named "(allowed to fail)". Signed-off-by: Jacob Stopak <jacob@initialcommit.io>
1 parent 28a615f commit c32b8e9

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ permissions:
1010

1111
jobs:
1212
unit:
13-
name: ${{ matrix.os }}, Python ${{ matrix.python }}
13+
name: ${{ matrix.os }}, Python ${{ matrix.python }}${{ matrix.python == '3.15' && ' (allowed to fail)' || '' }}
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-latest, macos-latest, windows-latest]
1919
python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
20-
# skia-python publishes no 3.15 wheels yet, so 3.15 runs report
21-
# whether the install works there without failing the others
22-
continue-on-error: ${{ matrix.python == '3.15' }}
20+
# skia-python publishes no 3.15 wheels yet, so on 3.15 each step may fail:
21+
# its log says how far it got, but the job (and the commit's check) stays
22+
# green. continue-on-error on the job itself would still mark the commit
23+
# failed. The steps after the install run once it succeeds.
2324
steps:
2425
- uses: actions/checkout@v4
2526
- uses: actions/setup-python@v5
@@ -30,15 +31,22 @@ jobs:
3031
if: runner.os == 'Linux'
3132
run: sudo apt-get update && sudo apt-get install -y libegl1 libgl1 libfontconfig1
3233
- name: Install
34+
id: install
35+
continue-on-error: ${{ matrix.python == '3.15' }}
3336
run: python -m pip install ".[dev]"
3437
- name: Set a Git identity for the test repos
38+
if: steps.install.outcome == 'success'
3539
run: |
3640
git config --global user.name "git-sim tests"
3741
git config --global user.email "tests@example.com"
3842
git config --global init.defaultBranch main
3943
- name: Unit tests
44+
if: steps.install.outcome == 'success'
45+
continue-on-error: ${{ matrix.python == '3.15' }}
4046
run: python -m pytest tests/unit_tests -q
4147
- name: Draw a simulation
48+
if: steps.install.outcome == 'success'
49+
continue-on-error: ${{ matrix.python == '3.15' }}
4250
shell: bash
4351
run: |
4452
git init -q demo && cd demo

0 commit comments

Comments
 (0)