I'm having some trouble running Cypress tests within our GitLab CI pipeline. As soon as I start the Quasar development server with yarn quasar dev it looks as if it is actually starting, but then it seems to be kind of locked up.
This state was for like an hour before GitLab killed the job.
Here is the pipeline definition. Please note that this is a simplified version for the sake of this question.
.gitlab-ci.yml
---
variables:
FF_USE_FASTZIP: "true"
YARN_CACHE_FOLDER: "$CI_PROJECT_DIR/.cache/yarn"
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/.cache/Cypress"
.cache_configuration:
cache:
key:
files:
- yarn.lock
paths:
- package.json
- yarn.lock
- .cache/
- node_modules/
- dist/spa/
stages:
- test
# Install dependencies and start Quasar dev server
ui-chrome:
stage: test
image: cypress/browsers:node16.14.0-chrome99-ff97
extends: .cache_configuration
cache:
policy: pull
script:
- yarn install --frozen-lockfile # this works
- yarn quasar dev # this seems to work but causes the lock up
- yarn cypress run # this does not work
rules:
- if: '$CI_COMMIT_TAG =~ /^\d+.\d+.\d+$/'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"
