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 3, 2021
1 parent fdffa27 commit 2def61d
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,43 @@ jobs:
- name: Node.js 0.8
node-version: "0.8"
npm-i: [email protected] [email protected]
npm-rm: istanbul
npm-rm: nyc

- name: Node.js 0.10
node-version: "0.10"
npm-i: [email protected] [email protected]
npm-i: [email protected] [email protected] [email protected]

- name: Node.js 0.12
node-version: "0.12"
npm-i: [email protected] [email protected]
npm-i: [email protected] [email protected] [email protected]

- name: io.js 1.x
node-version: "1.8"
npm-i: [email protected] [email protected]
npm-i: [email protected] [email protected] [email protected]

- name: io.js 2.x
node-version: "2.5"
npm-i: [email protected] [email protected]
npm-i: [email protected] [email protected] [email protected]

- name: io.js 3.x
node-version: "3.3"
npm-i: [email protected] [email protected]
npm-i: [email protected] [email protected] [email protected]

- name: Node.js 4.x
node-version: "4.9"
npm-i: [email protected] [email protected]
npm-i: [email protected] [email protected] [email protected]

- name: Node.js 5.x
node-version: "5.12"
npm-i: [email protected] [email protected]
npm-i: [email protected] [email protected] [email protected]

- name: Node.js 6.x
node-version: "6.17"
npm-i: [email protected]
npm-i: [email protected] [email protected]

- name: Node.js 7.x
node-version: "7.10"
npm-i: [email protected]
npm-i: [email protected] [email protected]

- name: Node.js 8.x
node-version: "8.16"
Expand Down Expand Up @@ -160,7 +160,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 @@ -172,7 +172,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/
npm-debug.log
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.1.1",
"eslint-plugin-standard": "4.1.0",
"istanbul": "0.4.5",
"mocha": "9.1.3",
"nyc": "15.1.0",
"safe-buffer": "5.2.1",
"supertest": "6.1.6"
},
Expand All @@ -35,8 +35,8 @@
"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",
"version": "node scripts/version-history.js && git add HISTORY.md"
}
}

0 comments on commit 2def61d

Please sign in to comment.