'Gitlab doesn't execute second Cypress command

I have a problem with a pipeline in gitlab. This is the excerpt from the gitlab-ci-yml.

...
script:
- cypress run --config-file cypress.json --project %cd% --headless --spec='%cd%\cypress\integration\a.spec.js'
- cypress run --config-file cypress.json --project %cd% --headless --spec='%cd%\cypress\integration\b.spec.js'
...

The problem is that only the first command is executed. The second one is ignored. The code below works, but I prefer the code above:

script:
- cypress run --config-file cypress.json --project %cd% --headless --spec='%cd%\cypress\integration\a.spec.js,%cd%\cypress\integration\b.spec.js'

Any ideas?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source