Skip to content

Commit 5817eba

Browse files
authored
test: coverage and test cases
1 parent 95fa060 commit 5817eba

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: '18.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
- run: npm install
18+
19+
# Run tests and generate coverage report
20+
- run: npm test -- --coverage
21+
continue-on-error: false
22+
23+
# Send the coverage report to Coveralls
24+
- run: npm install coveralls --save-dev
25+
- run: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
26+
env:
27+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_POSTGRES_TOKEN }}

0 commit comments

Comments
 (0)