Skip to content

v3.0.1

v3.0.1 #51

Workflow file for this run

name: Test coverage
on:
workflow_dispatch:
push:
branches:
- main
# Only run when push includes commits with changes to:
paths:
- 'src/**.ts'
- 'test/**.ts'
- 'test/**.pot?'
- 'jest.config.ts'
- 'tsup.config.js'
- 'tsconfig.json'
- 'package.json'
- 'package-lock.json'
release:
types: [published]
jobs:
collect_and_upload:
name: Collect and upload test coverage
if: |
github.event_name != 'push' ||
!startsWith(github.event.head_commit.message, 'Merge pull request #')
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Jest with coverage
run: npm test -- --coverage
# Save coverage report in Coveralls
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
# - name: Codecov
# uses: codecov/codecov-action@v3
# with:
# directory: ./test/coverage/
# # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# # files: ./coverage1.xml,./coverage2.xml # optional
# flags: unittests # optional
# # path_to_write_report: ./coverage/codecov_report.txt
# # fail_ci_if_error: true # optional (default = false)
# verbose: true # optional (default = false)