Commit bc5d3b91 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch...

Merge branch '227005-consider-running-eslint-as-if-foss-to-catch-potential-foss-specific-failures-in-advance' into 'master'

Run eslint as-if-foss upon any frontend changes in EE

Closes #227005

See merge request gitlab-org/gitlab!36049
parents 22c0334a 2562dc81
......@@ -2,16 +2,18 @@
extends:
- .default-retry
- .default-before_script
- .assets-compile-cache
variables:
SETUP_DB: "false"
# we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS: --max_old_space_size=3584
WEBPACK_VENDOR_DLL: "true"
.compile-assets-base:
extends: .frontend-base
extends:
- .frontend-base
- .assets-compile-cache
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-git-2.27-lfs-2.9-node-12.x-yarn-1.21-graphicsmagick-1.3.34
variables:
WEBPACK_VENDOR_DLL: "true"
stage: prepare
script:
- node --version
......@@ -99,6 +101,7 @@ update-yarn-cache:
needs: ["setup-test-env", "compile-test-assets"]
variables:
SETUP_DB: "true"
WEBPACK_VENDOR_DLL: "true"
script:
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
......@@ -123,22 +126,25 @@ frontend-fixtures-as-if-foss:
.frontend-test-base:
extends:
- .default-retry
- .frontend-base
- .yarn-cache
variables:
USE_BUNDLE_INSTALL: "false"
SETUP_DB: "false"
stage: test
before_script:
- source scripts/utils.sh
eslint-as-if-foss:
extends:
- .frontend-test-base
- .frontend:rules:eslint-as-if-foss
- .as-if-foss
needs: []
script:
- run_timed_command "retry yarn install --frozen-lockfile"
- yarn run eslint
.karma-base:
extends: .frontend-test-base
variables:
# we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS: --max_old_space_size=3584
script:
- source scripts/utils.sh
- export BABEL_ENV=coverage CHROME_LOG_FILE=chrome_debug.log
- run_timed_command "retry yarn install --frozen-lockfile"
- run_timed_command "yarn karma"
......@@ -171,7 +177,6 @@ karma-as-if-foss:
.jest-base:
extends: .frontend-test-base
script:
- source scripts/utils.sh
- run_timed_command "retry yarn install --frozen-lockfile"
- run_timed_command "yarn jest --ci --coverage --testSequencer ./scripts/frontend/parallel_ci_sequencer.js"
......@@ -197,7 +202,6 @@ jest-integration:
- .frontend-test-base
- .frontend:rules:default-frontend-jobs
script:
- source scripts/utils.sh
- run_timed_command "retry yarn install --frozen-lockfile"
- run_timed_command "yarn jest:integration --ci"
needs: ["frontend-fixtures"]
......
......@@ -340,6 +340,15 @@
- <<: *if-merge-request
changes: *ci-patterns
.frontend:rules:eslint-as-if-foss:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-as-if-foss
when: never
- <<: *if-merge-request
changes: *frontend-patterns
.frontend:rules:ee-mr-and-master-only:
rules:
- <<: *if-not-ee
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment