diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000..2130510 --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -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 diff --git a/package.json b/package.json index 582b2da..5d09781 100644 --- a/package.json +++ b/package.json @@ -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",