Skip to content

Commit

Permalink
test(coverage): add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Mar 23, 2024
1 parent 715c5f5 commit 4f64bf6
Show file tree
Hide file tree
Showing 3 changed files with 294 additions and 6 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on: ["push", "pull_request"]

name: Test Coveralls

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v1

- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x

- name: yarn install, yarn test:coverage
run: |
yarn install
echo repo_token: ${{ secrets.COVERALLS_REPO_TOKEN }} > .coveralls.yml
yarn test:coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
],
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage && coveralls < coverage/lcov.info",
"clean": "rimraf dist",
"build": "yarn clean && tsc --skipLibCheck && yarn build:prod",
"build:prod": "NODE_ENV=production rollup --config --bundleConfigAsCjs",
Expand Down Expand Up @@ -50,6 +51,7 @@
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"commitizen": "^4.3.0",
"coveralls": "^3.1.1",
"eslint": "^8.36.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.8.0",
Expand Down
Loading

0 comments on commit 4f64bf6

Please sign in to comment.