From b7ba4842e4f67c4235bcaca3ff1b9c4c6e573e83 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Mon, 6 May 2024 16:47:02 +0100 Subject: [PATCH] chore: swap out artefacts for annotions --- .github/workflows/coverage.yml | 7 +++++++ .github/workflows/test.yml | 7 ++++--- package.json | 2 +- test/config/cucumber.mjs | 6 +++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f8b26cc..b67b627 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -37,3 +37,10 @@ jobs: CC_TEST_REPORTER_ID: 760097cb88b4c685dce427cf94a8e12a5f082774d06b4f4f5daef839ffc07821 with: coverageCommand: npm run lcov + + - name: Coverage annotations + uses: jgillick/test-coverage-annotations@v1 + with: + access-token: ${{ secrets.GITHUB_TOKEN }} + coverage: ./coverage/coverage-summary.json + only-changed-files: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2a776e..0402892 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,8 @@ jobs: - name: Run Tests and Linting run: npm run test - - uses: actions/upload-artifact@v3 + - name: Cucumber annotations + uses: deblockt/cucumber-report-annotations-action@v1.7 with: - name: test-reports-${{ matrix.node-version }} - path: test/reports/ + access-token: ${{ secrets.GITHUB_TOKEN }} + path: "test/reports/cucumber-report.ndjson" diff --git a/package.json b/package.json index c59ed34..4731c11 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "test:integration": "npm run test:integration:init && cucumber-js --config ./test/config/cucumber.mjs", "test": "npm run test:unit && npm run test:integration", "coverage": "c8 mocha && c8 report --reporter=html && c8 report --reporter=json-summary", - "lcov": "c8 mocha && c8 report --reporter=lcov", + "lcov": "c8 mocha && c8 report --reporter=lcov && c8 report --reporter=json-summary", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --fix", "format": "prettier --log-level warn --write \"**/*.{js,json,jsx,md,ts,tsx,html}\"", diff --git a/test/config/cucumber.mjs b/test/config/cucumber.mjs index b160c04..9c814a6 100644 --- a/test/config/cucumber.mjs +++ b/test/config/cucumber.mjs @@ -1,6 +1,6 @@ export default { parallel: 0, - format: ['html:test/reports/cucumber-report.html'], - paths: ['test/features'], - forceExit: true + format: ["message:test/reports/cucumber-report.ndjson"], + paths: ["test/features"], + forceExit: true, };