Skip to content

Commit 8c2d7bb

Browse files
committed
Add test coverage report
1 parent dfdf7b8 commit 8c2d7bb

File tree

8 files changed

+45
-7
lines changed

8 files changed

+45
-7
lines changed

.github/workflows/base-coverage.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Generate Base Main Coverage Report
2+
3+
on:
4+
push:
5+
branches: [main]
6+
jobs:
7+
base-coverage:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: 'Checkout Github Action'
11+
uses: actions/checkout@master
12+
13+
- name: Cache turbo build setup
14+
uses: actions/cache@v4
15+
with:
16+
path: .turbo
17+
key: ${{ runner.os }}-turbo-${{ github.sha }}
18+
restore-keys: |
19+
${{ runner.os }}-turbo-
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: 20.x
25+
26+
- uses: pnpm/action-setup@v3
27+
with:
28+
version: 8
29+
run_install: |
30+
- recursive: true
31+
args: [--frozen-lockfile, --strict-peer-dependencies]
32+
33+
- run: pnpm turbo run test:lib --cache-dir=.turbo
34+
- run: npx cobertura-merge-globby -o coverage.xml --files="**/cobertura-coverage.xml"
35+
- uses: clearlyip/code-coverage-report-action@v4
36+
with:
37+
#Location of the generated coverage file
38+
filename: 'coverage.xml'

libs/chatbot/vitest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineProject({
1010
watch: false,
1111
environment: 'jsdom',
1212
setupFiles: ['test-setup.ts'],
13-
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'json'] },
13+
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'cobertura'] },
1414
restoreMocks: true,
1515
alias: [
1616
{

libs/data-mapper-v2/vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineProject({
1010
watch: false,
1111
environment: 'jsdom',
1212
setupFiles: ['test-setup.ts'],
13-
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'json'] },
13+
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'cobertura'] },
1414
restoreMocks: true,
1515
alias: [
1616
{

libs/data-mapper/vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineProject({
1010
watch: false,
1111
environment: 'jsdom',
1212
setupFiles: ['test-setup.ts'],
13-
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'json'] },
13+
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'cobertura'] },
1414
restoreMocks: true,
1515
alias: [
1616
{

libs/designer-ui/vitest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineProject({
1010
watch: false,
1111
environment: 'jsdom',
1212
setupFiles: ['test-setup.ts'],
13-
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'json'] },
13+
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'cobertura'] },
1414
restoreMocks: true,
1515
alias: [
1616
{

libs/designer/vitest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineProject({
1010
watch: false,
1111
environment: 'jsdom',
1212
setupFiles: ['test-setup.ts'],
13-
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'json'] },
13+
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'cobertura'] },
1414
restoreMocks: true,
1515
alias: [
1616
{

libs/logic-apps-shared/vitest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineProject({
1111
globals: true,
1212
environment: 'jsdom',
1313
setupFiles: ['test-setup.ts'],
14-
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'json'] },
14+
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'cobertura'] },
1515
typecheck: { enabled: true },
1616
restoreMocks: true,
1717
},

libs/vscode-extension/vitest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineProject({
1010
watch: false,
1111
environment: 'jsdom',
1212
setupFiles: ['test-setup.ts'],
13-
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'json'] },
13+
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'], reporter: ['html', 'cobertura'] },
1414
restoreMocks: true,
1515

1616
},

0 commit comments

Comments
 (0)