From ab3a2dd04660620ad0980788c838ecf3c10dfff3 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 12 Jan 2022 17:51:08 +0200 Subject: [PATCH] Add coverage with c8 --- .github/workflows/ci.yml | 2 +- .gitignore | 1 + package.json | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b779bc..fd55458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,4 +32,4 @@ jobs: run: npm install - name: Run tests - run: npm test + run: npm run ci diff --git a/.gitignore b/.gitignore index 239ecff..9eb6759 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules yarn.lock +/coverage diff --git a/package.json b/package.json index 2c46cd0..a6f0a70 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "scripts": { "ava": "ava", "xo": "xo", + "ci": "npm run xo && c8 ava", "test": "npm run xo && npm run ava" }, "main": "index.js", @@ -31,6 +32,12 @@ "local", "wrapper" ], + "c8": { + "reporter": [ + "lcovonly", + "text" + ] + }, "dependencies": { "bin-check": "^4.1.0", "bin-version-check": "^5.0.0", @@ -39,6 +46,7 @@ }, "devDependencies": { "ava": "^4.0.1", + "c8": "^7.11.0", "executable": "^4.1.1", "nock": "^13.2.2", "path-exists": "^5.0.0",