How to conditionally run a job if a matrix parameter is defined

Hi there!

In the this workflow, defined the following jobs:

    strategy:
      matrix:
        php:
          - '7.1'
          - '7.2'
          - '7.3'
          - '7.4'
        composer-dependencies:
          - highest
        include:
          - php: '7.1'
            composer-dependencies: lowest
          - php: '7.4'
            composer-dependencies: lowest
          - php: '7.1'
            symfony-require: '3.4.*'
            composer-dependencies: highest
          - php: '7.1'
            symfony-require: '4.4.*'
            composer-dependencies: highest
          - php: '7.2'
            symfony-require: '5.1.*'
            composer-dependencies: highest
          - php: '7.2'
            symfony-require: '5.2.*'
            composer-dependencies: highest

I expect this matrix to expand to the following jobs list:

  • 7.1 highest
  • 7.2 highest
  • 7.3 highest
  • 7.4 highest
  • 7.1 lowest
  • 7.4 lowest
  • 7.1 3.4.* highest
  • 7.1 4.4.* highest
  • 7.2 5.1.* highest
  • 7.2 5.2.* highest

But when the workflow is executed, only the first 6 jobs of the previous list are run (see https://github.com/fbourigault/LiipImagineBundle/actions/runs/430099278)

What’s wrong with my workflow?

I found my mistake. Those jobs with the symfony-require extra settings where matched includes.