Skip to content

Commit 97f9931

Browse files
committed
ci: add ESLint cache to speed up lint workflow
- Cache .eslintcache file between runs - Use restore-keys for cross-branch cache fallback - Only re-lint files that have changed
1 parent 76bdd21 commit 97f9931

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/lint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ jobs:
1313
- name: Install dependencies
1414
uses: ./.github/actions/install-all-build-libs
1515

16+
- name: Cache ESLint results
17+
uses: actions/cache@v4
18+
with:
19+
path: .eslintcache
20+
key: eslint-${{ runner.os }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '.eslintrc*', 'eslint.config.*') }}
21+
restore-keys: |
22+
eslint-${{ runner.os }}-
23+
1624
- name: Run ESLint
17-
run: yarn lint
25+
run: yarn lint --cache --cache-location .eslintcache
1826

0 commit comments

Comments
 (0)