diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6fe853c..4482fb6 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -14,6 +14,12 @@ jobs: run: | npm install npm run build --if-present - npm test + npm run test + npm run coverage env: CI: true + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./docs/coverage/lcov.info diff --git a/package-lock.json b/package-lock.json index 3167427..a4ead9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,8 +19,7 @@ "typescript": "^4.8.3" }, "engines": { - "node": ">= 12.4", - "npm": ">= 6.x" + "npm": ">= 8.x" } }, "node_modules/@ampproject/remapping": { diff --git a/package.json b/package.json index 1d3be07..517c426 100644 --- a/package.json +++ b/package.json @@ -36,13 +36,15 @@ "typescript": "^4.8.3" }, "scripts": { - "clean": "rm -rf dist test-dist", + "clean": "rm -rf dist; rm -rf test-dist; rm -rf .test_run", "test:compile": "tsc -b test", "test:copy_node_modules": "cpy \"node_modules/**/*\" ../test-dist/", "test:run": "mocha --config .mocharc.js", "test:build": "npm-run-all build test:compile test:copy_node_modules", "test": "npm-run-all test:build test:run", "report": "nyc report", + "coverage": "nyc npm run test:run", + "coveralls": "nyc report --reporter=text-lcov | coveralls", "build": "npm run clean && tsc" }, "files": [