.gitlab-ci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # @see https://docs.cypress.io/guides/continuous-integration/gitlab-ci
  2. # Consult the results on the Cypress dashboard: https://dashboard.cypress.io/
  3. stages:
  4. - build
  5. - test
  6. ## Set environment variables for folders in "cache" job settings for npm modules and Cypress binary
  7. variables:
  8. npm_config_cache: '$CI_PROJECT_DIR/.npm'
  9. CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress'
  10. cache:
  11. key: ${CI_COMMIT_REF_SLUG}
  12. paths:
  13. - .cache/*
  14. - cache/Cypress
  15. - node_modules
  16. - build
  17. ## Install NPM dependencies and Cypress
  18. install:
  19. image: cypress/browsers:node14.17.0-chrome88-ff89
  20. stage: build
  21. script:
  22. - yarn install --dev
  23. - npx cypress cache path
  24. - npx cypress cache list
  25. - yarn build:ci
  26. chrome:
  27. image: cypress/browsers:node14.17.0-chrome88-ff89
  28. stage: test
  29. parallel: 5
  30. script:
  31. - yarn ci & npx wait-on http://localhost:3004
  32. - yarn cypress:silent --record --parallel --browser chrome --group "Chrome"
  33. chrome-mobile:
  34. image: cypress/browsers:node14.17.0-chrome88-ff89
  35. stage: test
  36. parallel: 5
  37. script:
  38. - yarn ci & npx wait-on http://localhost:3004
  39. - yarn cypress:silent --record --parallel --browser chrome --group "Chrome - Mobile" --config "viewportWidth=375,viewportHeight=667"
  40. firefox:
  41. image: cypress/browsers:node14.17.0-chrome88-ff89
  42. stage: test
  43. parallel: 5
  44. script:
  45. - yarn ci & npx wait-on http://localhost:3004
  46. - yarn cypress:silent --record --parallel --browser firefox --group "Firefox"
  47. firefox-mobile:
  48. image: cypress/browsers:node14.17.0-chrome88-ff89
  49. stage: test
  50. parallel: 5
  51. script:
  52. - yarn ci & npx wait-on http://localhost:3004
  53. - yarn cypress:silent --record --parallel --browser firefox --group "Firefox - Mobile" --config "viewportWidth=375,viewportHeight=667"