diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /.gitlab/ci/frontend.gitlab-ci.yml | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to '.gitlab/ci/frontend.gitlab-ci.yml')
-rw-r--r-- | .gitlab/ci/frontend.gitlab-ci.yml | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 1d0218f4bd7..3bd65b565e4 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -18,6 +18,7 @@ # Disable warnings in browserslist which can break on backports # https://github.com/browserslist/browserslist/blob/a287ec6/node.js#L367-L384 BROWSERSLIST_IGNORE_OLD_DATA: "true" + WEBPACK_COMPILE_LOG_PATH: "tmp/webpack-output.log" stage: prepare script: - *yarn-install @@ -31,7 +32,6 @@ compile-production-assets: variables: NODE_ENV: "production" RAILS_ENV: "production" - WEBPACK_REPORT: "true" artifacts: name: webpack-report expire_in: 31d @@ -40,10 +40,9 @@ compile-production-assets: # - in `build-assets-image` job to create assets image for packaging systems # - GitLab UI for integration tests: https://gitlab.com/gitlab-org/gitlab-ui/-/blob/e88493b3c855aea30bf60baee692a64606b0eb1e/.storybook/preview-head.pug#L1 - public/assets/ - - webpack-report/ + - "${WEBPACK_COMPILE_LOG_PATH}" when: always before_script: - - scripts/checkout-mr-source-sha - !reference [.default-before_script, before_script] after_script: - rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here @@ -57,6 +56,7 @@ compile-test-assets: paths: - public/assets/ - node_modules/@gitlab/svgs/dist/icons.json # app/helpers/icons_helper.rb uses this file + - "${WEBPACK_COMPILE_LOG_PATH}" when: always compile-test-assets as-if-foss: @@ -213,7 +213,15 @@ jest minimal: - !reference [jest, needs] - "detect-tests" script: - - run_timed_command "yarn jest:ci:minimal" + - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]]; then run_timed_command "yarn jest:ci:minimal"; fi + +jest as-if-foss: + extends: + - .jest-base + - .frontend:rules:jest:as-if-foss + - .as-if-foss + needs: ["rspec-all frontend_fixture as-if-foss"] + parallel: 2 jest minimal as-if-foss: extends: @@ -224,7 +232,7 @@ jest minimal as-if-foss: - "rspec-all frontend_fixture as-if-foss" - "detect-tests" script: - - run_timed_command "yarn jest:ci:minimal" + - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]]; then run_timed_command "yarn jest:ci:minimal"; fi jest-integration: extends: @@ -236,19 +244,11 @@ jest-integration: - job: "rspec-all frontend_fixture" - job: "graphql-schema-dump" -jest-as-if-foss: - extends: - - .jest-base - - .frontend:rules:default-frontend-jobs-as-if-foss - - .as-if-foss - needs: ["rspec-all frontend_fixture as-if-foss"] - parallel: 2 - coverage-frontend: extends: - .default-retry - .yarn-cache - - .frontend:rules:ee-mr-and-default-branch-only + - .frontend:rules:coverage-frontend needs: - job: "jest" optional: true @@ -260,7 +260,9 @@ coverage-frontend: script: - run_timed_command "yarn node scripts/frontend/merge_coverage_frontend.js" # Removing the individual coverage results, as we just merged them. - - rm -r coverage-frontend/jest-* + - if ls coverage-frontend/jest-* > /dev/null 2>&1; then + rm -r coverage-frontend/jest-*; + fi coverage: '/^Statements\s*:\s*?(\d+(?:\.\d+)?)%/' artifacts: name: coverage-frontend @@ -320,24 +322,20 @@ webpack-dev-server: bundle-size-review: extends: - .default-retry + - .assets-compile-cache - .frontend:rules:bundle-size-review image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:danger stage: test - needs: ["compile-production-assets"] + needs: [] script: - - source scripts/utils.sh - - mkdir -p bundle-size-review - - cp webpack-report/index.html bundle-size-review/bundle-report.html - - yarn global add https://gitlab.com/gitlab-org/frontend/playground/webpack-memory-metrics.git - - | - danger_id=$(echo -n ${DANGER_GITLAB_API_TOKEN} | md5sum | awk '{print $1}' | cut -c5-10) - run_timed_command "danger --dangerfile=danger/Dangerfile-bundle_size --fail-on-errors=true --verbose --danger_id=bundle-size-review-${danger_id}" + - *yarn-install + - scripts/bundle_size_review artifacts: when: always name: bundle-size-review expire_in: 31d paths: - - bundle-size-review + - bundle-size-review/ .startup-css-check-base: extends: |