Skip to content
Snippets Groups Projects
Verified Commit 5374786d authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3463108 by catch, smustgrave: Use artifacts to share the eslint and...

Issue #3463108 by catch, smustgrave: Use artifacts to share the eslint and styleint caches from core to MRs
parent 1d1669b4
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,18 @@ default: ...@@ -115,6 +115,18 @@ default:
# exist. # exist.
- 'curl --location --output core/.cspellcache "https://git.drupalcode.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/{$CACHE_TARGET}/raw/core/.cspellcache?job=Lint%20cache%20warming" || true' - 'curl --location --output core/.cspellcache "https://git.drupalcode.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/{$CACHE_TARGET}/raw/core/.cspellcache?job=Lint%20cache%20warming" || true'
.eslint-cache: &eslint-cache
# Fetch the eslint cache from the artifacts of the latest successful job from
# the target branch. Allow the job to proceed and pass if the file doesn't
# exist.
- 'curl --location --output core/.eslintcache "https://git.drupalcode.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/{$CACHE_TARGET}/raw/core/.eslintcache?job=Lint%20cache%20warming" || true'
.stylelint-cache: &stylelint-cache
# Fetch the stylelint cache from the artifacts of the latest successful job from
# the target branch. Allow the job to proceed and pass if the file doesn't
# exist.
- 'curl --location --output core/.stylelintcache "https://git.drupalcode.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/{$CACHE_TARGET}/raw/core/.stylelintcache?job=Lint%20cache%20warming" || true'
.core-spellcheck: &core-spellcheck .core-spellcheck: &core-spellcheck
- cd core - cd core
- corepack enable - corepack enable
...@@ -271,14 +283,21 @@ default: ...@@ -271,14 +283,21 @@ default:
script: script:
- *phpstan-cache - *phpstan-cache
- *cspell-cache - *cspell-cache
- *eslint-cache
- *stylelint-cache
- composer install - composer install
- vendor/bin/phpstan --version - vendor/bin/phpstan --version
- php vendor/bin/phpstan -vvv analyze --configuration=./core/phpstan.neon.dist - php vendor/bin/phpstan -vvv analyze --configuration=./core/phpstan.neon.dist
- *core-spellcheck - *core-spellcheck
- yarn run lint:core-js-passing --cache --cache-strategy content
- yarn run build:css --check
- yarn run lint:css --cache --cache-location .stylelintcache --cache-strategy content
artifacts: artifacts:
paths: paths:
- core/phpstan-tmp/resultCache.php - core/phpstan-tmp/resultCache.php
- core/.cspellcache - core/.cspellcache
- core/.eslintcache
- core/.stylelintcache
'🧹 PHP Static Analysis (phpstan)': '🧹 PHP Static Analysis (phpstan)':
<<: [ *default-job-settings-lint ] <<: [ *default-job-settings-lint ]
...@@ -357,11 +376,12 @@ default: ...@@ -357,11 +376,12 @@ default:
- when: manual - when: manual
allow_failure: true allow_failure: true
script: script:
- *eslint-cache
- cd core - cd core
- corepack enable - corepack enable
- yarn install - yarn install
- yarn run check:ckeditor5 - yarn run check:ckeditor5
- yarn run lint:core-js-passing --format gitlab - yarn run lint:core-js-passing --cache --cache-strategy content --format gitlab
artifacts: artifacts:
reports: reports:
codequality: eslint-quality-report.json codequality: eslint-quality-report.json
...@@ -383,11 +403,12 @@ default: ...@@ -383,11 +403,12 @@ default:
- when: manual - when: manual
allow_failure: true allow_failure: true
script: script:
- *stylelint-cache
- corepack enable - corepack enable
- cd core - cd core
- yarn install - yarn install
- yarn run build:css --check - yarn run build:css --check
- yarn run lint:css --color --custom-formatter=node_modules/stylelint-formatter-gitlab - yarn run lint:css --cache --cache-location .stylelintcache --cache-strategy content --color --custom-formatter=node_modules/stylelint-formatter-gitlab
artifacts: artifacts:
reports: reports:
codequality: stylelint-quality-report.json codequality: stylelint-quality-report.json
......
...@@ -29,3 +29,9 @@ nightwatch.settings.json ...@@ -29,3 +29,9 @@ nightwatch.settings.json
# Ignore phpstan cache # Ignore phpstan cache
phpstan-tmp phpstan-tmp
# Ignore eslint cache
.eslintcache
# Ignore stylelint cache
.stylelint-cache
...@@ -208,6 +208,7 @@ endtrans ...@@ -208,6 +208,7 @@ endtrans
enoki enoki
entityviewedit entityviewedit
errmode errmode
eslintcache
etag etag
eurozone eurozone
evenodd evenodd
...@@ -568,6 +569,7 @@ strs ...@@ -568,6 +569,7 @@ strs
sttid sttid
styleguide styleguide
stylelint stylelint
stylelintcache
stylescombo stylescombo
subarrays subarrays
subchild subchild
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment