File tree Expand file tree Collapse file tree 1 file changed +43
-3
lines changed Expand file tree Collapse file tree 1 file changed +43
-3
lines changed Original file line number Diff line number Diff line change @@ -157,11 +157,51 @@ jobs:
157
157
- name : Remove non-test dependencies
158
158
run : npm rm --silent --save-dev connect-redis
159
159
160
- - name : Run tests
161
- run : npm test
162
-
163
160
- name : Output Node and NPM versions
164
161
run : |
165
162
echo "Node.js version: $(node -v)"
166
163
echo "NPM version: $(npm -v)"
167
164
165
+ - name : Run tests
166
+ shell : bash
167
+ run : |
168
+ npm run test-ci
169
+ cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"
170
+
171
+ - name : Collect code coverage
172
+ run : |
173
+ mv ./coverage "./${{ matrix.name }}"
174
+ mkdir ./coverage
175
+ mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"
176
+
177
+ - name : Upload code coverage
178
+ uses : actions/upload-artifact@v3
179
+ with :
180
+ name : coverage
181
+ path : ./coverage
182
+ retention-days : 1
183
+
184
+ coverage :
185
+ needs : test
186
+ runs-on : ubuntu-latest
187
+ steps :
188
+ - uses : actions/checkout@v4
189
+
190
+ - name : Install lcov
191
+ shell : bash
192
+ run : sudo apt-get -y install lcov
193
+
194
+ - name : Collect coverage reports
195
+ uses : actions/download-artifact@v3
196
+ with :
197
+ name : coverage
198
+ path : ./coverage
199
+
200
+ - name : Merge coverage reports
201
+ shell : bash
202
+ run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info
203
+
204
+ - name : Upload coverage report
205
+ uses : coverallsapp/github-action@master
206
+ with :
207
+ github-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments