Skip to content

Commit feeaaf1

Browse files
authored
chore: add codecov integration (#35)
* chore: add codecov integration * create lcov report
1 parent f36dfeb commit feeaaf1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
- name: Install Playwright Browsers
2626
run: npx playwright install chromium --only-shell
2727
- run: npm test -- --forbid-only
28+
- name: Upload coverage reports to Codecov
29+
uses: codecov/codecov-action@v5
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}
2832

2933
check-ts:
3034
name: Check types

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"types": "dist/index.d.ts",
3939
"scripts": {
40-
"test": "c8 --reporter=text playwright test",
40+
"test": "c8 --reporter=text --reporter=lcov playwright test",
4141
"build": "tsdown",
4242
"check": "tsc --noEmit",
4343
"lint": "oxlint --config .oxlintrc.json",

src/cli/program.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ export function program(
5959
},
6060
coverage_data: Coverage[],
6161
) {
62-
if (coverage_data.length === 0) {
63-
throw new MissingDataError()
64-
}
6562
let coverage = calculate_coverage(coverage_data)
6663
let min_line_coverage_result = validate_min_line_coverage(coverage.line_coverage_ratio, min_file_coverage)
6764
let min_file_line_coverage_result = validate_min_file_line_coverage(

0 commit comments

Comments
 (0)