Skip to content

Commit 8fc7087

Browse files
authored
Merge pull request tailwindlabs#2208 from tailwindlabs/cache-node-modules-on-ci
Cache node modules in CI
2 parents c79b0b9 + f2e622a commit 8fc7087

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/nodejs.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,19 @@ jobs:
2323
uses: actions/setup-node@v1
2424
with:
2525
node-version: ${{ matrix.node-version }}
26-
- run: npm install
26+
- name: Use cached node_modules
27+
id: cache
28+
uses: actions/cache@v1
29+
with:
30+
path: node_modules
31+
key: nodeModules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
32+
restore-keys: |
33+
nodeModules-
34+
- name: Install dependencies
35+
if: steps.cache.outputs.cache-hit != 'true'
36+
run: npm install
37+
env:
38+
CI: true
2739
- run: npm run prepare
2840
- run: npm test
2941
env:

0 commit comments

Comments
 (0)