Skip to content

Commit

Permalink
build: add coveralls action
Browse files Browse the repository at this point in the history
  • Loading branch information
wozjac committed Jun 19, 2024
1 parent 1fc36b2 commit f0778f5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
push:
branches:
- main

jobs:
coveralls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install --no-optional
- name: Generate coverage
run: npm run coverage-lcov
- name: Coveralls
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ github.token }}
file: ./coverage/lcov.info
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"license": "MIT",
"scripts": {
"coverage": "c8 npm test",
"coverage-lcov": "c8 npm test && c8 report --reporter=lcovonly",
"coveralls": "c8 npm test && c8 report --reporter=text-lcov | coveralls",
"lint": "eslint -c config/eslint.config.js src/**.*js",
"pretest": "npm run lint",
Expand Down

0 comments on commit f0778f5

Please sign in to comment.