Skip to content

Commit 7f4fd89

Browse files
authored
ci(caching): Add .eslintcache and .next/cache to cache (#14252)
1 parent 82f4a68 commit 7f4fd89

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

.github/workflows/lint-404s.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ jobs:
3232
- uses: actions/cache@v4
3333
id: cache
3434
with:
35-
path: ${{ github.workspace }}/node_modules
35+
path: |
36+
${{ github.workspace }}/node_modules
37+
${{ github.workspace }}/.next/cache
38+
${{ github.workspace }}/.eslintcache
3639
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
40+
restore-keys: |
41+
node-${{ runner.os }}-
3742
3843
- run: yarn install --frozen-lockfile
3944
if: steps.cache.outputs.cache-hit != 'true'

.github/workflows/test.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,23 @@ jobs:
2929
- uses: actions/cache@v4
3030
id: cache
3131
with:
32-
path: ${{ github.workspace }}/node_modules
32+
path: |
33+
${{ github.workspace }}/node_modules
34+
${{ github.workspace }}/.next/cache
35+
${{ github.workspace }}/.eslintcache
3336
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
37+
restore-keys: |
38+
node-${{ runner.os }}-
39+
3440
- run: yarn install --frozen-lockfile
3541
if: steps.cache.outputs.cache-hit != 'true'
3642

3743
# Additional checks
3844
- run: yarn lint:ts
39-
- run: yarn lint:docs
4045

4146
# Run automatic fixes (run prettier apart from eslint to also fix mdx files)
4247
- run: yarn lint:prettier:fix
43-
- run: yarn lint:eslint:fix
48+
- run: yarn lint:eslint:fix --cache
4449

4550
# Check (and error) for dirty working tree for forks
4651
# Reason being we need a different token to auto commit changes and
@@ -69,8 +74,14 @@ jobs:
6974
- uses: actions/cache@v4
7075
id: cache
7176
with:
72-
path: ${{ github.workspace }}/node_modules
77+
path: |
78+
${{ github.workspace }}/node_modules
79+
${{ github.workspace }}/.next/cache
80+
${{ github.workspace }}/.eslintcache
7381
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
82+
restore-keys: |
83+
node-${{ runner.os }}-
84+
7485
- run: yarn install --frozen-lockfile
7586
if: steps.cache.outputs.cache-hit != 'true'
7687
- name: Run Tests

bin/lint-docs.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"start": "next start",
2626
"lint": "next lint",
2727
"lint:ts": "tsc --skipLibCheck",
28-
"lint:docs": "bin/lint-docs.ts",
2928
"lint:eslint": "eslint \"{src,app,scripts}/**/*.{ts,tsx,js,jsx}\"",
3029
"lint:eslint:fix": "eslint --fix \"{src,app,scripts}/**/*.{ts,tsx,js,jsx}\"",
3130
"lint:prettier": "prettier --check \"./{src,app,scripts}/**/*.{md,mdx,ts,tsx,js,jsx,mjs}\"",

0 commit comments

Comments
 (0)