.template_vitest_shard: stage: test extends: - .job_rules_default cache: !reference [.cache, read_only_nodejs] before_script: - !reference [.scripts, yarn_install] script: # Only run one worker to avoid load peaks affecting other jobs. - yarn test --min-workers=1 --max-workers=1 --shard $VITEST_SHARD # Stop here, except on the first shard. - "[[ $VITEST_SHARD = 1/* ]] || exit 0" - echo "Also test eslint-plugin-zammad…" - cd .eslint-plugin-zammad - yarn install || yarn install || yarn install # retry on errors - yarn test frontend:vitest:1: extends: - .template_vitest_shard variables: VITEST_SHARD: 1/3 frontend:vitest:2: extends: - .template_vitest_shard variables: VITEST_SHARD: 2/3 frontend:vitest:3: extends: - .template_vitest_shard variables: VITEST_SHARD: 3/3 frontend:cypress: stage: test extends: - .job_rules_default - .tags_docker_low_concurrency cache: !reference [.cache, read_only_nodejs] before_script: - !reference [.scripts, yarn_install] - yarn cypress:install script: - sysctl -w fs.inotify.max_user_watches=524288 # see https://github.com/cypress-io/cypress/issues/6960 - yarn test:ci:ct artifacts: expire_in: 1 week when: on_failure paths: - app/frontend/cypress/**/__image_snapshots__/**/* - .cypress/**/__diff_output__/* - .cypress/videos/**/* - .cypress/screenshots/**/*