Syntax error specifying `fail-fast: false`

Hello! I was recently adding a matrix to our Github Actions, and when I tried to set fail-fast to false like so:

  test:
    name: Linux tests
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby: [2.7, 3.0]
    steps:
...

It raise the following error in Github Actions:


It seems like this is directly related to fail-fast, but I’m not sure why it won’t accept false when true is the default?

fail-fast was incorrectly placed under matrix here:

The parent key needs to be strategy.

If you put it under matrix instead, then it is treated like any other user-defined matrix option with no special meaning. GitHub expects an array however, which explains the error message. If you passed [false] then it would be accepted as matrix option, but the combinations “Ruby 2.7, false” and “Ruby 3.0, false” aren’t meaningful.

2 Likes

:woman_facepalming: Oh my goodness, thank you!

1 Like