Skip to content

Commit

Permalink
ci: ESLintのキャッシュの扱い (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
SnO₂WMaN authored Mar 28, 2021
1 parent dfe322c commit 6599625
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ jobs:
- node/install-packages:
pkg-manager: yarn
- restore_cache:
key: eslint-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run: yarn run lint:eslint --cache --format junit --output-file ./junit/eslint.xml
keys:
- eslintcache-{{ .Branch }}-{{ checksum ".eslintrc" }}-{{ checksum "yarn.lock" }}
- eslintcache-{{ .Branch }}-{{ checksum ".eslintrc" }}
- eslintcache-{{ .Branch }}
- eslintcache
- run: yarn run lint:eslint --format junit --output-file ./junit/eslint.xml
- save_cache:
key: eslint-{{ .Branch }}-{{ checksum "yarn.lock" }}
key: eslintcache-{{ .Branch }}-{{ checksum ".eslintrc" }}-{{ checksum "yarn.lock" }}
paths:
- .eslintcache
- store_test_results:
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint/eslint
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh

eslint . --ext .js,.ts $@
eslint . --ext .js,.ts --cache $@

0 comments on commit 6599625

Please sign in to comment.