From d7ea450b4f5612d5508920aee953960602481977 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Wed, 15 Mar 2023 22:13:01 +0200 Subject: [PATCH] dont run coverage on node 16 --- .github/workflows/nodejs.yml | 6 +++++- package.json | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 65959c9b..68aa264a 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -38,6 +38,10 @@ jobs: - name: Install dependencies run: npm install - name: Run tests - run: npm run coverage-all + if: matrix.node-version == '16.x' + run: npm run test-unit + - name: Run tests + if: matrix.node-version != '16.x' + run: npm run coverage:ci - name: Upload coverage report to Codecov uses: codecov/codecov-action@v3 diff --git a/package.json b/package.json index a7d1fa61..51f5b9a5 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,9 @@ "scripts": { "test": "npm run test-unit && npm run lint", "test-unit": "node --test test/unit", - "test-all": "node --test", + "test:reporters": "node --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=@reporters/github --test-reporter-destination=stdout test/unit", "coverage": "c8 --reporter=html --reporter=text --reporter=text-summary npm test", - "coverage-all": "c8 --reporter=lcov --reporter=text --reporter=text-summary npm run test-all", + "coverage:ci": "c8 --reporter=lcov --reporter=text --reporter=text-summary npm run test:reporters", "lint": "eslint . --cache", "lint-fix": "eslint . --fix" }, @@ -55,6 +55,7 @@ "yargs": "^17.7.1" }, "devDependencies": { + "@reporters/github": "^1.1.2", "c8": "^7.13.0", "eslint": "^8.35.0", "eslint-config-standard": "^17.0.0",