@@ -95,15 +95,29 @@ jobs:
95
95
- name : Checkout credo
96
96
uses : actions/checkout@v4
97
97
98
+ - name : Setup NodeJS
99
+ id : setup-node
100
+ uses : actions/setup-node@v4
101
+ with :
102
+ node-version : ${{ matrix.node-version }}
103
+
98
104
- uses : pnpm/action-setup@v2
99
105
with :
100
106
version : 9.1.0
101
107
102
- - name : Setup NodeJS
103
- uses : actions/setup-node@v4
108
+ # See https://github.com/actions/setup-node/issues/641#issuecomment-1358859686
109
+ - name : pnpm cache path
110
+ id : pnpm-cache-path
111
+ run : |
112
+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
113
+
114
+ - name : pnpm cache
115
+ uses : actions/cache@v3
104
116
with :
105
- node-version : ${{ matrix.node-version }}
106
- cache : ' pnpm'
117
+ path : ${{ steps.pnpm-cache-path.outputs.STORE_PATH }}
118
+ key : ${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
119
+ restore-keys : |
120
+ ${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-pnpm-store-
107
121
108
122
- name : Install dependencies
109
123
run : pnpm install --frozen-lockfile
@@ -136,15 +150,29 @@ jobs:
136
150
- name : Setup services
137
151
run : docker compose up -d
138
152
153
+ - name : Setup NodeJS
154
+ id : setup-node
155
+ uses : actions/setup-node@v4
156
+ with :
157
+ node-version : ${{ matrix.node-version }}
158
+
139
159
- uses : pnpm/action-setup@v2
140
160
with :
141
161
version : 9.1.0
142
162
143
- - name : Setup NodeJS
144
- uses : actions/setup-node@v4
163
+ # See https://github.com/actions/setup-node/issues/641#issuecomment-1358859686
164
+ - name : pnpm cache path
165
+ id : pnpm-cache-path
166
+ run : |
167
+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
168
+
169
+ - name : pnpm cache
170
+ uses : actions/cache@v3
145
171
with :
146
- node-version : ${{ matrix.node-version }}
147
- cache : ' pnpm'
172
+ path : ${{ steps.pnpm-cache-path.outputs.STORE_PATH }}
173
+ key : ${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
174
+ restore-keys : |
175
+ ${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-pnpm-store-
148
176
149
177
- name : Install dependencies
150
178
run : pnpm install --frozen-lockfile
0 commit comments