diff options
author | Takuya Noguchi <takninnovationresearch@gmail.com> | 2020-09-02 07:23:35 +0300 |
---|---|---|
committer | Takuya Noguchi <takninnovationresearch@gmail.com> | 2020-09-02 07:24:46 +0300 |
commit | c134ce494abe9223e8d75edb499a9b2bfcabae45 (patch) | |
tree | 58359be423023fd74fcab8a7c0130b0adf334a98 /.gitlab-ci.yml | |
parent | 616b1863fe8aef31a33fcea9c63e188525617b58 (diff) |
Avoid RubyGem installation on JS jobs to make CI faster
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d14a9a664..67e026745 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,10 @@ default: - ruby -v - NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install --jobs 4 --path vendor +.yarn: + before_script: + - yarn install --cache-folder .yarn-cache + stages: - build-images - build @@ -106,6 +110,14 @@ variables: - vendor/ruby - .yarn-cache/ +.cache_yarn: + cache: + key: + files: + - yarn.lock + paths: + - .yarn-cache/ + ############################################### # Build the website # ############################################### @@ -194,11 +206,11 @@ rspec: jest: extends: - .rules_site_tests - - .cache_gem_yarn + - .cache_yarn + - .yarn needs: [] stage: test script: - - yarn install --cache-folder .yarn-cache - yarn test # @@ -207,11 +219,11 @@ jest: js_lint: extends: - .rules_site_tests - - .cache_gem_yarn + - .cache_yarn + - .yarn needs: [] stage: test script: - - yarn install --cache-folder .yarn-cache - yarn eslint - yarn prettier |