Skip to content

Commit 5e1b66a

Browse files
authored
Merge pull request #59 from monkey0722/update/ci
Update workflow to improve caching strategy
2 parents 39ed09e + a833ab0 commit 5e1b66a

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/blank.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
node: [22]
17-
timeout-minutes: 300
17+
timeout-minutes: 30
1818
steps:
1919
- name: checkout pushed commit
2020
uses: actions/checkout@v3
@@ -24,8 +24,19 @@ jobs:
2424
uses: actions/setup-node@v3
2525
with:
2626
node-version: ${{ matrix.node }}
27-
- run: |
28-
yarn install
29-
yarn typecheck
30-
yarn lint
31-
yarn test
27+
- name: cache dependencies
28+
uses: actions/cache@v3
29+
with:
30+
path: |
31+
node_modules
32+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
33+
restore-keys: |
34+
${{ runner.os }}-yarn-
35+
- name: install dependencies
36+
run: yarn install --frozen-lockfile
37+
- name: typecheck
38+
run: yarn typecheck
39+
- name: lint
40+
run: yarn lint
41+
- name: test
42+
run: yarn test

0 commit comments

Comments
 (0)