Cache eslint cache in CI
This commit is contained in:
parent
11cfcb4e32
commit
2109c7f205
2 changed files with 20 additions and 1 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -30,6 +30,16 @@ jobs:
|
|||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
|
||||
|
||||
- name: Restore cached .eslintcache and tsconfig.tsbuildinfo
|
||||
uses: actions/cache/restore@v3
|
||||
id: cache-lint
|
||||
with:
|
||||
path: |
|
||||
.eslintcache
|
||||
tsconfig.tsbuildinfo
|
||||
key: lint-${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**', '.eslintrc.js', '.eslint/**', 'tsconfig.json') }}
|
||||
|
||||
- name: Install Desktop node_modules
|
||||
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
||||
run: yarn install --frozen-lockfile
|
||||
|
@ -42,6 +52,15 @@ jobs:
|
|||
- run: yarn lint-license-comments
|
||||
- run: git diff --exit-code
|
||||
|
||||
- name: Update cached .eslintcache and tsconfig.tsbuildinfo
|
||||
uses: actions/cache/save@v3
|
||||
if: github.ref == 'refs/heads/main'
|
||||
with:
|
||||
path: |
|
||||
.eslintcache
|
||||
tsconfig.tsbuildinfo
|
||||
key: ${{ steps.cache-lint.cache-primary-key }}
|
||||
|
||||
macos:
|
||||
needs: lint
|
||||
runs-on: macos-latest
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
"test-eslint": "mocha .eslint/rules/**/*.test.js --ignore-leaks",
|
||||
"test-node-coverage": "nyc --reporter=lcov --reporter=text mocha --recursive test/modules ts/test-node ts/test-both",
|
||||
"test-lint-intl": "ts-node ./build/intl-linter/linter.ts --test",
|
||||
"eslint": "eslint --cache . --max-warnings 0",
|
||||
"eslint": "eslint --cache . --cache-strategy content --max-warnings 0",
|
||||
"lint": "run-s --print-label lint-prettier check:types eslint",
|
||||
"lint-deps": "node ts/util/lint/linter.js",
|
||||
"lint-license-comments": "ts-node ts/util/lint/license_comments.ts",
|
||||
|
|
Loading…
Add table
Reference in a new issue