44 push :
55 branches : [main]
66 pull_request :
7- types : [opened]
7+ types : [opened, synchronize ]
88
99jobs :
1010 setup :
@@ -24,15 +24,16 @@ jobs:
2424 node-version : 20
2525 cache : pnpm
2626
27- - name : Cache dependencies
28- id : node_modules_cache_id
27+ - name : Cache pnpm store
2928 uses : actions/cache@v4
3029 with :
31- path : node_modules
32- key : node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
30+ path : ~/.pnpm-store
31+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
32+ restore-keys : |
33+ ${{ runner.os }}-pnpm-store-
3334
3435 - name : Install dependencies
35- run : pnpm install
36+ run : pnpm install --frozen-lockfile
3637
3738 lint :
3839 needs : setup
@@ -46,17 +47,16 @@ jobs:
4647 with :
4748 version : 9.3.0
4849
49- - name : Setup Node
50- uses : actions/setup-node@v4
51- with :
52- node-version : 20
53- cache : pnpm
54-
55- - name : Restore cached dependencies
50+ - name : Restore cached pnpm store
5651 uses : actions/cache@v4
5752 with :
58- path : node_modules
59- key : node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
53+ path : ~/.pnpm-store
54+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
55+ restore-keys : |
56+ ${{ runner.os }}-pnpm-store-
57+
58+ - name : Install dependencies
59+ run : pnpm install --frozen-lockfile
6060
6161 - name : Lint Check
6262 run : pnpm lint
@@ -67,23 +67,23 @@ jobs:
6767 steps :
6868 - name : Checkout
6969 uses : actions/checkout@v4
70-
70+
7171 - name : Setup Pnpm
7272 uses : pnpm/action-setup@v3
7373 with :
7474 version : 9.3.0
7575
76- - name : Cache dependencies
76+ - name : Restore cached pnpm store
7777 uses : actions/cache@v4
7878 with :
79- path : node_modules
80- key : node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
79+ path : ~/.pnpm-store
80+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
81+ restore-keys : |
82+ ${{ runner.os }}-pnpm-store-
83+
84+ - name : Install dependencies
85+ run : pnpm install --frozen-lockfile
8186
82- - name : Setup Node
83- uses : actions/setup-node@v4
84- with :
85- node-version : 20
86- cache : pnpm
8787 - name : Type Check
8888 run : pnpm typecheck
8989
@@ -93,23 +93,22 @@ jobs:
9393 steps :
9494 - name : Checkout
9595 uses : actions/checkout@v4
96-
96+
9797 - name : Setup Pnpm
9898 uses : pnpm/action-setup@v3
9999 with :
100- version : 9.3,0
101-
102- - name : Setup Node
103- uses : actions/setup-node@v4
104- with :
105- node-version : 20
106- cache : pnpm
100+ version : 9.3.0
107101
108- - name : Cache dependencies
102+ - name : Restore cached pnpm store
109103 uses : actions/cache@v4
110104 with :
111- path : node_modules
112- key : node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
105+ path : ~/.pnpm-store
106+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
107+ restore-keys : |
108+ ${{ runner.os }}-pnpm-store-
109+
110+ - name : Install dependencies
111+ run : pnpm install --frozen-lockfile
113112
114113 - name : Unit Test
115114 run : pnpm test
@@ -124,30 +123,28 @@ jobs:
124123 flag-name : Unit Test
125124 parallel : true
126125
127-
128126 build :
129127 needs : setup
130128 runs-on : ubuntu-latest
131129 steps :
132130 - name : Checkout
133131 uses : actions/checkout@v4
134-
132+
135133 - name : Setup Pnpm
136134 uses : pnpm/action-setup@v3
137135 with :
138136 version : 9.3.0
139137
140- - name : Setup Node
141- uses : actions/setup-node@v4
142- with :
143- node-version : 20
144- cache : pnpm
145-
146- - name : Cache dependencies
138+ - name : Restore cached pnpm store
147139 uses : actions/cache@v4
148140 with :
149- path : node_modules
150- key : node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
141+ path : ~/.pnpm-store
142+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
143+ restore-keys : |
144+ ${{ runner.os }}-pnpm-store-
145+
146+ - name : Install dependencies
147+ run : pnpm install --frozen-lockfile
151148
152149 - name : Build
153150 run : pnpm build
@@ -160,4 +157,4 @@ jobs:
160157 uses : coverallsapp/github-action@v2
161158 with :
162159 parallel-finished : true
163- carryforward : " run-1,run-2"
160+ carryforward : " run-1,run-2"
0 commit comments