How to allow a special workflows actions matrix combination to fail?

Assuming that I found a bug where py38 is broken under OSX and I want to allow this job to fail until it is fixed (upstream reasons).

How do I do this on GitHub Actions?

Current configuration at

Add an if clause to the job?

if: matrix.python-version != ‘3.8’ && matrix.os != macOS-10.14

Hi ssbarnea,

Thanks for your feedback!

You can skip this combination (py38+osx) directly with the ‘exclude’ option, code as below:


      # excludes py38 on OSX

      - os: macos-10.14

        python-version: 3.8

As screenshot shows, combination(py38+osx) is excluded.  After you fix the py38 broken error, you can remove the exclude option to add combination back.


Excluding a broken environment risks on even breaking it in new ways and prevents testing changes that may fix it. The trick here is to run the job but to avoid considering its potential failure.

1 Like

Hey @ssbarnea ,

If you are trying to ensure that when that job fails, your other jobs do not cancel, you can use the fail-fast flag

Hmm…You can split the combination (py38+osx) out of the current strategy and put it into a new job in the workflow file, use ‘fast-fail’ or 'jobs.<job_id>.steps.continue-on-error’ as you wish.