Skip to content

Commit

Permalink
build: use nyc for coverage testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Nov 16, 2021
1 parent d80cf11 commit dafa811
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,43 @@ jobs:
- name: Node.js 0.8
node-version: "0.8"
npm-i: mocha@2.5.3 supertest@1.1.0
npm-rm: istanbul
npm-rm: nyc

- name: Node.js 0.10
node-version: "0.10"
npm-i: mocha@3.5.3 supertest@2.0.0
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: Node.js 0.12
node-version: "0.12"
npm-i: mocha@3.5.3 supertest@2.0.0
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: io.js 1.x
node-version: "1.8"
npm-i: mocha@3.5.3 supertest@2.0.0
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: io.js 2.x
node-version: "2.5"
npm-i: mocha@3.5.3 supertest@2.0.0
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: io.js 3.x
node-version: "3.3"
npm-i: mocha@3.5.3 supertest@2.0.0
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: Node.js 4.x
node-version: "4.9"
npm-i: mocha@5.2.0 supertest@3.4.2
npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2

- name: Node.js 5.x
node-version: "5.12"
npm-i: mocha@5.2.0 supertest@3.4.2
npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2

- name: Node.js 6.x
node-version: "6.17"
npm-i: mocha@6.2.2
npm-i: mocha@6.2.2 nyc@14.1.1

- name: Node.js 7.x
node-version: "7.10"
npm-i: mocha@6.2.2
npm-i: mocha@6.2.2 nyc@14.1.1

- name: Node.js 8.x
node-version: "8.17"
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
- name: Run tests
shell: bash
run: |
if npm -ps ls istanbul | grep -q istanbul; then
if npm -ps ls nyc | grep -q nyc; then
npm run test-ci
else
npm test
Expand All @@ -166,7 +166,7 @@ jobs:

- name: Collect code coverage
uses: coverallsapp/github-action@master
if: steps.list_env.outputs.istanbul != ''
if: steps.list_env.outputs.nyc != ''
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.test_number }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.nyc_output
coverage
node_modules
package-lock.json
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.0.1",
"istanbul": "0.4.5",
"mocha": "8.4.0",
"nyc": "15.1.0",
"supertest": "6.1.6"
},
"files": [
Expand All @@ -39,7 +39,7 @@
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}

0 comments on commit dafa811

Please sign in to comment.