Skip to content

Commit 63330b3

Browse files
authored
Set up coverage reporting (#4)
1 parent beaf71a commit 63330b3

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

.github/workflows/verify.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ permissions:
1212
contents: read
1313

1414
jobs:
15+
coverage:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v6
19+
- uses: actions/setup-node@v6
20+
with:
21+
node-version: 24
22+
- uses: pnpm/action-setup@v4
23+
- run: pnpm install
24+
- run: pnpm test --coverage
25+
- uses: codecov/codecov-action@v5
26+
with:
27+
token: ${{ secrets.CODECOV_TOKEN }}
28+
1529
format:
1630
runs-on: ubuntu-latest
1731
steps:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
[![](https://img.shields.io/npm/v/%40standard-config%2Fprettier?color=success)](https://www.npmjs.com/package/@standard-config/prettier)
1+
[![](https://img.shields.io/npm/v/%40standard-config%2Fprettier)](https://www.npmjs.com/package/@standard-config/prettier)
22
[![](https://img.shields.io/github/actions/workflow/status/standard-config/prettier/test.yaml)](https://github.com/standard-config/prettier/actions/workflows/test.yaml)
3+
[![](https://img.shields.io/codecov/c/github/standard-config/prettier)](https://codecov.io/github/standard-config/prettier)
34

45
# @standard-config/prettier
56

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"engines": {
3131
"node": ">=24"
3232
},
33-
"packageManager": "pnpm@10.27.0",
33+
"packageManager": "pnpm@10.28.0",
3434
"dependencies": {
3535
"@prettier/plugin-oxc": "^0.1.3",
3636
"klona": "^2.0.6",

vitest.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import { defineConfig } from 'vitest/config';
22

33
export default defineConfig({
44
test: {
5+
coverage: {
6+
thresholds: {
7+
branches: 100,
8+
functions: 100,
9+
statements: 100,
10+
},
11+
},
512
typecheck: {
613
enabled: true,
714
},

0 commit comments

Comments
 (0)