Skip to content

Commit

Permalink
Merge pull request gutentag2012#7 from gutentag2012/chore/print-coverage
Browse files Browse the repository at this point in the history
Chore/print coverage
  • Loading branch information
gutentag2012 authored Apr 6, 2024
2 parents 31dbe0e + 95d30e4 commit 76a0e17
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
permissions:
actions: read
contents: read
pull-requests: write

jobs:
style:
Expand Down Expand Up @@ -44,3 +45,24 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm test
- name: Coverage Report (form-core)
if: always()
uses: davelosert/vitest-coverage-report-action@v2
with:
name: "Form Core Coverage"
json-summary-path: "./packages/form-core/coverage/coverage-summary.json"
json-final-path: "./packages/form-core/coverage/coverage-final.json"
- name: Coverage Report (form-react)
if: always()
uses: davelosert/vitest-coverage-report-action@v2
with:
name: "Form React Coverage"
json-summary-path: "./packages/form-react/coverage/coverage-summary.json"
json-final-path: "./packages/form-react/coverage/coverage-final.json"
- name: Coverage Report (validation-adapter-zod)
if: always()
uses: davelosert/vitest-coverage-report-action@v2
with:
name: "Validation Adapter Zod Coverage"
json-summary-path: "./packages/validation-adapter-zod/coverage/coverage-summary.json"
json-final-path: "./packages/validation-adapter-zod/coverage/coverage-final.json"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<img src="https://github.com/gutentag2012/form-signals/raw/main/assets/repo-banner-light.svg" alt="Signal Form Banner" width="100%">

![GitHub Actions Workflow Status](https://github.com/gutentag2012/form-signals/actions/workflows/ci.yml/badge.svg)
![GitHub Actions Workflow Status](https://github.com/gutentag2012/form-signals/actions/workflows/cd.yml/badge.svg)<br/>
[![form-core-version](https://img.shields.io/npm/v/%40formsignals%2Fform-core?style=for-the-badge&logo=npm&label=form-core)](https://www.npmjs.com/package/@formsignals/form-core)
[![form-react-version](https://img.shields.io/npm/v/%40formsignals%2Fform-react?style=for-the-badge&logo=npm&label=form-react)](https://www.npmjs.com/package/@formsignals/form-react)
[![validation-adapter-zod-version](https://img.shields.io/npm/v/%40formsignals%2Fvalidation-adapter-zod?style=for-the-badge&logo=npm&label=validation-adapter-zod)](https://www.npmjs.com/package/@formsignals/validation-adapter-zod) <br/>
Expand Down
17 changes: 16 additions & 1 deletion packages/form-core/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@ export default defineConfig({
provider: 'istanbul',
include: ['src/**/*'],
exclude: ['**/*.spec.ts', '**/*.spec-d.ts', '**/*.bench.ts'],
reporter: ['html', 'lcov', 'text', 'text-summary'],
reporter: [
'html',
'lcov',
'text',
'text-summary',
'json',
'json-summary',
'cobertura',
],
reportOnFailure: true,
thresholds: {
statements: 90,
branches: 90,
functions: 90,
lines: 90,
},
},
typecheck: { enabled: true },
},
Expand Down
17 changes: 16 additions & 1 deletion packages/form-react/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,22 @@ export default defineConfig({
'src/TestComponent.tsx',
'src/utils/useIsomorphicLayoutEffect.ts',
],
reporter: ['html', 'lcov', 'text', 'text-summary'],
reporter: [
'html',
'lcov',
'text',
'text-summary',
'json',
'json-summary',
'cobertura',
],
reportOnFailure: true,
thresholds: {
statements: 90,
branches: 90,
functions: 90,
lines: 90,
},
},
typecheck: { enabled: true },
},
Expand Down
17 changes: 16 additions & 1 deletion packages/validation-adapter-zod/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@ export default defineConfig({
provider: 'istanbul',
include: ['src/**/*'],
exclude: ['**/*.spec.ts', '**/*.spec-d.ts', '**/*.bench.ts'],
reporter: ['html', 'lcov', 'text', 'text-summary'],
reporter: [
'html',
'lcov',
'text',
'text-summary',
'json',
'json-summary',
'cobertura',
],
reportOnFailure: true,
thresholds: {
statements: 90,
branches: 90,
functions: 90,
lines: 90,
},
},
typecheck: { enabled: true },
},
Expand Down

0 comments on commit 76a0e17

Please sign in to comment.