Skip to content

Commit d388cfb

Browse files
committed
Add a coverage job to CI
This new job is very barebones at the moment. It only outputs a summary of the coverage in the terminal, since the entire coverage is a bit long and unwieldy. Perhaps Codecov or similar can be used in the future.
1 parent eb42f5c commit d388cfb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,20 @@ jobs:
126126
cd lib/loader
127127
npm run asbuild
128128
npm run test
129+
coverage:
130+
name: "Coverage"
131+
runs-on: ubuntu-latest
132+
needs: check
133+
steps:
134+
- uses: actions/checkout@v3
135+
- uses: dcodeIO/setup-node-nvm@master
136+
with:
137+
node-version: current
138+
- name: Install dependencies
139+
run: npm ci --no-audit
140+
- name: Build
141+
run: npm run build
142+
- name: Collect coverage
143+
run: npx c8 -r none -- npm test
144+
- name: Output coverage summary
145+
run: npx c8 report -r text-summary

0 commit comments

Comments
 (0)