Skip to content

Commit c8bb606

Browse files
authored
ci: add Codecov coverage upload and policy
Uploads coverage/coverage-final.json produced by vitest --coverage (v8 provider) to Codecov via codecov-action@v6.0.0. Adds codecov.yml enforcing no project regression and ≥80% patch coverage. Adds coverage badge to README. Refs opendecree/decree#153 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent b0a93e5 commit c8bb606

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ jobs:
6767
- name: Run tests with coverage
6868
run: npm run test:coverage
6969

70+
- name: Upload coverage to Codecov
71+
# codecov/codecov-action@v6.0.0
72+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2
73+
with:
74+
files: coverage/coverage-final.json
75+
token: ${{ secrets.CODECOV_TOKEN }}
76+
7077
examples:
7178
name: Examples
7279
runs-on: ubuntu-latest

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[![Downloads](https://img.shields.io/npm/dm/@opendecree/sdk)](https://www.npmjs.com/package/@opendecree/sdk)
77
[![License](https://img.shields.io/github/license/opendecree/decree-typescript)](LICENSE)
88
[![Project Status: WIP](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
9+
[![codecov](https://codecov.io/gh/opendecree/decree-typescript/graph/badge.svg)](https://codecov.io/gh/opendecree/decree-typescript)
910

1011
TypeScript SDK for [OpenDecree](https://github.com/opendecree/decree) -- schema-driven configuration management.
1112

codecov.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: auto
6+
threshold: 0%
7+
patch:
8+
default:
9+
target: 80%

0 commit comments

Comments
 (0)