frontend.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. .template_vitest_shard:
  2. stage: test
  3. extends:
  4. - .job_rules_default
  5. cache: !reference [.cache, read_only_nodejs]
  6. before_script:
  7. - !reference [.scripts, pnpm_install]
  8. - !reference [.scripts, pnpm_install_eslint_plugin_zammad]
  9. script:
  10. # Only run one worker to avoid load peaks affecting other jobs.
  11. - pnpm test -- --min-workers=1 --max-workers=1 --shard $VITEST_SHARD
  12. # Stop here, except on the first shard.
  13. - "[[ $VITEST_SHARD = 1/* ]] || exit 0"
  14. - echo "Also test eslint-plugin-zammad…"
  15. - cd .eslint-plugin-zammad
  16. - pnpm test
  17. frontend:vitest:1:
  18. extends:
  19. - .template_vitest_shard
  20. variables:
  21. VITEST_SHARD: 1/3
  22. frontend:vitest:2:
  23. extends:
  24. - .template_vitest_shard
  25. variables:
  26. VITEST_SHARD: 2/3
  27. frontend:vitest:3:
  28. extends:
  29. - .template_vitest_shard
  30. variables:
  31. VITEST_SHARD: 3/3
  32. frontend:cypress:
  33. stage: test
  34. extends:
  35. - .job_rules_default
  36. - .tags_docker_low_concurrency
  37. cache: !reference [.cache, read_only_nodejs]
  38. before_script:
  39. - !reference [.scripts, pnpm_install_cypress]
  40. script:
  41. - sysctl -w fs.inotify.max_user_watches=524288 # see https://github.com/cypress-io/cypress/issues/6960
  42. - pnpm test:ci:ct
  43. artifacts:
  44. expire_in: 1 week
  45. when: on_failure
  46. paths:
  47. - app/frontend/cypress/**/__image_snapshots__/**/*
  48. - .dev/cypress/**/__diff_output__/*
  49. - .dev/cypress/videos/**/*
  50. - .dev/cypress/screenshots/**/*