diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2e024a3..5a95638 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -24,3 +24,18 @@ jobs: - run: npm run format:check - run: npm test - run: npm run coverage:check + # Uploaded from one matrix leg only — the report is identical across them, and + # two legs writing the same artifact name is an error. Makes a coverage + # regression inspectable from the failing run instead of only reproducible locally. + - name: Upload coverage report + if: matrix.node-version == '22.x' + uses: actions/upload-artifact@v7 + with: + name: coverage-report + # Only the readable report. `coverage/` also holds c8's raw V8 dump in + # tmp/, which is ~97% of the bytes and inspectable by nothing — 23 MB of + # tmp against a 647 kB report in the worst case here. + path: | + coverage/lcov-report + coverage/lcov.info + retention-days: 14 diff --git a/package.json b/package.json index 32b5484..8c92397 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,10 @@ "coverage:check": "c8 --check-coverage npm test" }, "c8": { + "reporter": [ + "text", + "lcov" + ], "include": [ "telegrambot/**/*.js" ],