4
4
push :
5
5
branches : [main]
6
6
pull_request :
7
- types : [opened]
7
+ types : [opened, synchronize ]
8
8
9
9
jobs :
10
10
setup :
@@ -24,15 +24,16 @@ jobs:
24
24
node-version : 20
25
25
cache : pnpm
26
26
27
- - name : Cache dependencies
28
- id : node_modules_cache_id
27
+ - name : Cache pnpm store
29
28
uses : actions/cache@v4
30
29
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-
33
34
34
35
- name : Install dependencies
35
- run : pnpm install
36
+ run : pnpm install --frozen-lockfile
36
37
37
38
lint :
38
39
needs : setup
@@ -46,17 +47,16 @@ jobs:
46
47
with :
47
48
version : 9.3.0
48
49
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
56
51
uses : actions/cache@v4
57
52
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
60
60
61
61
- name : Lint Check
62
62
run : pnpm lint
@@ -67,23 +67,23 @@ jobs:
67
67
steps :
68
68
- name : Checkout
69
69
uses : actions/checkout@v4
70
-
70
+
71
71
- name : Setup Pnpm
72
72
uses : pnpm/action-setup@v3
73
73
with :
74
74
version : 9.3.0
75
75
76
- - name : Cache dependencies
76
+ - name : Restore cached pnpm store
77
77
uses : actions/cache@v4
78
78
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
81
86
82
- - name : Setup Node
83
- uses : actions/setup-node@v4
84
- with :
85
- node-version : 20
86
- cache : pnpm
87
87
- name : Type Check
88
88
run : pnpm typecheck
89
89
@@ -93,23 +93,22 @@ jobs:
93
93
steps :
94
94
- name : Checkout
95
95
uses : actions/checkout@v4
96
-
96
+
97
97
- name : Setup Pnpm
98
98
uses : pnpm/action-setup@v3
99
99
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
107
101
108
- - name : Cache dependencies
102
+ - name : Restore cached pnpm store
109
103
uses : actions/cache@v4
110
104
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
113
112
114
113
- name : Unit Test
115
114
run : pnpm test
@@ -124,30 +123,28 @@ jobs:
124
123
flag-name : Unit Test
125
124
parallel : true
126
125
127
-
128
126
build :
129
127
needs : setup
130
128
runs-on : ubuntu-latest
131
129
steps :
132
130
- name : Checkout
133
131
uses : actions/checkout@v4
134
-
132
+
135
133
- name : Setup Pnpm
136
134
uses : pnpm/action-setup@v3
137
135
with :
138
136
version : 9.3.0
139
137
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
147
139
uses : actions/cache@v4
148
140
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
151
148
152
149
- name : Build
153
150
run : pnpm build
@@ -160,4 +157,4 @@ jobs:
160
157
uses : coverallsapp/github-action@v2
161
158
with :
162
159
parallel-finished : true
163
- carryforward : " run-1,run-2"
160
+ carryforward : " run-1,run-2"
0 commit comments