From 420704041797daf804b505e5220805528fe26408 Mon Sep 17 00:00:00 2001 From: Delgan Date: Sun, 20 Oct 2024 11:45:19 +0200 Subject: [PATCH] Fix workflow marked as failed despite "continue-on-error" enabled When "continue-on-error" is set at the job's level, the entire workflow wont be considered as "failed" per se. However, the icon associated with a commit will still be a red cross mark "X". This is confusing, this could incorrectly suggest that the build has failed. By putting "continue-on-error" at the step's level, the job and therefore the full workflow will be marked as succeeded. This is preferable, even if it makes problems less noticeable. --- .github/workflows/tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2464e1e9..3b34fe4f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,6 @@ jobs: - '3.11' - '3.12' - '3.13' - - 3.14-dev - pypy-3.10 include: - os: ubuntu-20.04 @@ -33,8 +32,10 @@ jobs: python-version: '3.12' - os: macos-13 python-version: '3.12' + - os: ubuntu-22.04 + python-version: 3.14-dev + allow-failure: true runs-on: ${{ matrix.os }} - continue-on-error: ${{ endsWith(matrix.python-version, '-dev') }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -52,6 +53,7 @@ jobs: - name: Run tests run: | tox -e tests + continue-on-error: ${{ matrix.allow-failure }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -59,3 +61,4 @@ jobs: flags: ${{ matrix.os }}_${{ matrix.python-version }} verbose: true fail_ci_if_error: true + continue-on-error: ${{ matrix.allow-failure }}