GitHub Actions continue-on-error on a matrix hides a real failing leg
continue-on-error lets a step or job fail without failing the run. Applied to a whole matrix it masks every failing leg, so a broken combination passes CI silently and required checks go green.
What this error means
A matrix leg clearly failed in its logs, yet the job and the overall run are reported as successful.
strategy:
matrix:
target: [a, b, c]
continue-on-error: true # every leg can fail without failing the run
# target=b failed but the run is greenCommon causes
continue-on-error applied at job level over the matrix
It suppresses the failing status of every matrix leg, not just a known-flaky one.
Intent was to tolerate one leg, not all
Tolerating a single experimental combination requires scoping continue-on-error to that include entry.
How to fix it
Scope continue-on-error to a single include leg
- Move continue-on-error into the specific matrix combination you want to tolerate via include.
- Leave the rest of the matrix strict so real failures fail the run.
strategy:
matrix:
target: [a, b]
include:
- target: experimental
experimental: true
steps:
- run: ./build.sh ${{ matrix.target }}
continue-on-error: ${{ matrix.experimental == true }}Remove blanket continue-on-error
- Delete job-level continue-on-error unless every leg is genuinely allowed to fail.
- Use fail-fast: false to keep legs independent without hiding failures.
How to prevent it
- Keep continue-on-error as narrow as possible.
- Audit required checks to ensure they actually go red on real failures.