@@ -111,74 +111,11 @@ jobs:
111
111
# sudo apt install -y libxml2-utils
112
112
# xmllint --nonet --noout static/assets/svg-sprite.*.svg
113
113
114
- unit-test :
115
- needs : install
116
- runs-on : ubuntu-latest
117
- strategy :
118
- matrix :
119
- node-version : [20.x]
120
- steps :
121
- - name : Checkout
122
- uses : actions/checkout@v4
123
- - name : " Set time zone to Europe/Helsinki"
124
- uses : zcong1993/setup-timezone@master
125
- with :
126
- timezone : " Europe/Helsinki"
127
- - name : Use Node.js ${{ matrix.node-version }}
128
- uses : actions/setup-node@v4
129
- with :
130
- node-version : ${{ matrix.node-version }}
131
-
132
- # https://github.com/actions/cache/blob/8f1e2e02865c42348f9baddbbaafb1841dce610a/examples.md#node---yarn-2
133
- - name : Cache node_modules
134
- id : cache-node-modules
135
- uses : actions/cache@v4
136
- with :
137
- path : ' **/node_modules'
138
- key : ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
139
- - name : Cache .yarn/cache
140
- if : ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
141
- uses : actions/cache@v4
142
- with :
143
- path : ' .yarn/cache'
144
- key : yarn-v3-cache-${{ github.ref_name }}
145
- restore-keys : yarn-v3-cache-v3
146
- - name : Install dependencies
147
- if : ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
148
- run : yarn install --immutable
149
-
150
- - name : cache shared components
151
- id : cache-shared-components
152
- uses : actions/cache@v4
153
- with :
154
- path : ' digitransit-*'
155
- key : ${{ runner.os }}-shared-components-${{ hashFiles('digitransit-*') }}
156
- - name : Build shared components
157
- if : ${{ steps.cache-shared-components.outputs.cache-hit != 'true' }}
158
- run : yarn run build-workspaces
159
-
160
- - name : cache built Relay queries
161
- id : cache-relay
162
- uses : actions/cache@v4
163
- with :
164
- path : |
165
- ./__generated__
166
- **/__generated__
167
- key : ${{ runner.os }}-relay-${{ github.sha }}
168
- - name : build Relay queries
169
- if : ${{ steps.cache-relay.outputs.cache-hit != 'true' }}
170
- run : |
171
- yarn run relay
172
-
173
- - name : Run unit tests
174
- run : yarn run test-unit
175
-
176
114
# This is only done when pushing to v3
177
115
publish-npm :
178
116
if : github.ref == 'refs/heads/v3'
179
117
needs :
180
118
- lint
181
- - unit-test
182
119
runs-on : ubuntu-latest
183
120
strategy :
184
121
matrix :
@@ -275,7 +212,6 @@ jobs:
275
212
if : github.event_name == 'push'
276
213
needs :
277
214
- lint
278
- - unit-test
279
215
runs-on : ubuntu-latest
280
216
steps :
281
217
- name : Checkout
0 commit comments