Skip to content

Commit bf249d0

Browse files
committed
collect coverage on every version, merge, upload to coveralls
1 parent 03d1b75 commit bf249d0

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

.github/workflows/experimental.ci.yaml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,51 @@ jobs:
157157
- name: Remove non-test dependencies
158158
run: npm rm --silent --save-dev connect-redis
159159

160-
- name: Run tests
161-
run: npm test
162-
163160
- name: Output Node and NPM versions
164161
run: |
165162
echo "Node.js version: $(node -v)"
166163
echo "NPM version: $(npm -v)"
167164
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 }}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy