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 Dec 11, 2021
1 parent ea40e67 commit 3538251
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Expand Up @@ -31,43 +31,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.3
npm-i: mocha@6.2.3 nyc@14.1.1

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

- name: Node.js 8.x
node-version: "8.16"
Expand Down Expand Up @@ -156,7 +156,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 @@ -168,7 +168,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
@@ -1,3 +1,4 @@
.nyc_output/
coverage/
node_modules/
npm-debug.log
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -33,7 +33,7 @@ install:
# Remove all non-test dependencies
- ps: |
# Remove coverage dependency
npm rm --silent --save-dev istanbul
npm rm --silent --save-dev nyc
# Remove lint dependencies
cmd.exe /c "node -pe `"Object.keys(require('./package').devDependencies).join('\n')`"" | `
sls "^eslint(-|$)" | `
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -39,8 +39,8 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.1.0",
"istanbul": "0.4.5",
"mocha": "9.1.3",
"nyc": "15.1.0",
"supertest": "6.1.6"
},
"files": [
Expand All @@ -55,7 +55,7 @@
"scripts": {
"lint": "eslint .",
"test": "mocha --check-leaks --reporter spec --bail",
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot"
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}

0 comments on commit 3538251

Please sign in to comment.