Cache eslint cache in CI

This commit is contained in:
Fedor Indutny
2023-03-29 12:53:27 -07:00
committed by GitHub
parent 11cfcb4e32
commit 2109c7f205
2 changed files with 20 additions and 1 deletions

View File

@@ -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