Skip to content

Commit 84a9637

Browse files
committed
Scaffold example-typescript: cart/discount library with vitest LCOV coverage
Small idiomatic invoicing/cart library exercising the LCOV parser path via vitest, with lizard for complexity and a deliberately seeded jscpd duplication block, per plans/example-repositories-plan.md Phase 1.
0 parents  commit 84a9637

17 files changed

Lines changed: 2778 additions & 0 deletions

.github/workflows/coverage.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: coverage
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
permissions:
7+
id-token: write # OIDC → Worker
8+
checks: write # PR Check Run
9+
jobs:
10+
coverage:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
cache: npm
19+
20+
- run: npm ci
21+
22+
- run: npm run coverage # writes coverage/lcov.info
23+
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.x'
27+
28+
- run: pip install lizard
29+
30+
- run: python -m lizard src --xml > lizard-report.xml
31+
32+
- run: npx jscpd . --reporters json --output ./jscpd-report
33+
34+
- uses: CoverageTracker/coverage-tracker/.github/actions/report@v0.2.0
35+
with:
36+
worker-url: https://demo.coveragetracker.dev

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
coverage/
3+
jscpd-report/
4+
lizard-report.xml

.jscpd.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"ignore": [
3+
"node_modules/**",
4+
"coverage/**",
5+
"jscpd-report/**",
6+
"package-lock.json",
7+
"*.md"
8+
]
9+
}

0 commit comments

Comments
 (0)