Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Add coverage reporting #515

Merged
merged 3 commits into from Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/nodejs-test.yml
Expand Up @@ -6,9 +6,13 @@ on:
- 'dependabot/**'
pull_request:

permissions:
contents: read

env:
CI: true
FORCE_COLOR: 2
NODE_COV: 16 # The Node.js version to run coveralls on
wooorm marked this conversation as resolved.
Show resolved Hide resolved

jobs:
lint:
Expand All @@ -27,6 +31,9 @@ jobs:
test:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code

strategy:
fail-fast: false
Expand All @@ -52,3 +59,15 @@ jobs:

- name: Run Tests
run: npm run unit-tests
if: matrix.node != env.NODE_COV

- name: Run Jest with coverage
run: npm run unit-tests -- --coverage
if: matrix.node == env.NODE_COV

- name: Run Coveralls
uses: coverallsapp/github-action@1.1.3
if: matrix.node == env.NODE_COV
continue-on-error: true
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -3,8 +3,7 @@
.vscode
node_modules
docs/build
docs/05_api_reference.md
packages/*/dist/
test/dist/
.DS_Store
fb55 marked this conversation as resolved.
Show resolved Hide resolved
tsconfig.tsbuildinfo
coverage/