# @see https://docs.cypress.io/guides/continuous-integration/gitlab-ci # Consult the results on the Cypress dashboard: https://dashboard.cypress.io/ stages: - build - test ## Set environment variables for folders in "cache" job settings for npm modules and Cypress binary variables: npm_config_cache: '$CI_PROJECT_DIR/.npm' CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress' cache: key: ${CI_COMMIT_REF_SLUG} paths: - .cache/* - cache/Cypress - node_modules - build ## Install NPM dependencies and Cypress install: image: cypress/browsers:node14.17.0-chrome88-ff89 stage: build script: - yarn install --dev - npx cypress cache path - npx cypress cache list chrome: image: cypress/browsers:node14.17.0-chrome88-ff89 stage: test script: - yarn ci & npx wait-on http://localhost:3004 - yarn cypress:run --record --browser chrome --tag "Chrome" chrome-mobile: image: cypress/browsers:node14.17.0-chrome88-ff89 stage: test script: - yarn ci & npx wait-on http://localhost:3004 - yarn cypress:run --record --browser chrome --tag "Chrome - Mobile" --config "viewportWidth=375,viewportHeight=667" firefox: image: cypress/browsers:node14.17.0-chrome88-ff89 stage: test script: - yarn ci & npx wait-on http://localhost:3004 - yarn cypress:run --record --browser firefox --tag "Firefox" firefox-mobile: image: cypress/browsers:node14.17.0-chrome88-ff89 stage: test script: - yarn ci & npx wait-on http://localhost:3004 - yarn cypress:run --record --browser firefox --tag "Firefox - Mobile" --config "viewportWidth=375,viewportHeight=667"