Skip to content

Commit 63ad008

Browse files
committed
Merge branch 'feature/ODSODSWPA-1277-xhr-v3' into break/2.0.0-venus-version
2 parents 2483469 + d29fc95 commit 63ad008

4 files changed

Lines changed: 92 additions & 5 deletions

File tree

.github/workflows/auto-publish-beta.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,29 @@ jobs:
9393
9494
- name: Run tests
9595
run: |
96-
echo "Running tests..."
96+
echo "Running tests with coverage..."
9797
if pnpm run --help 2>&1 | grep -q "test:ci"; then
9898
pnpm test:ci
9999
else
100100
pnpm test
101101
fi
102102
103+
# Check coverage if exists
104+
if [ -f "coverage/lcov.info" ] || [ -f "__reports__/test-coverage/lcov.info" ]; then
105+
echo "Coverage report generated"
106+
fi
107+
108+
- name: Upload coverage to Codecov
109+
uses: codecov/codecov-action@v4
110+
continue-on-error: true
111+
with:
112+
token: ${{ secrets.CODECOV_TOKEN }}
113+
files: ./__reports__/test-coverage/coverage-final.json,./__reports__/test-coverage/lcov.info
114+
flags: beta
115+
name: codecov-beta
116+
fail_ci_if_error: false
117+
verbose: true
118+
103119
- name: Build package
104120
run: |
105121
echo "Building package..."

.github/workflows/auto-publish.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,26 @@ jobs:
124124
- name: Run tests
125125
if: steps.validate-branch.outputs.should_publish == 'true'
126126
run: |
127-
echo "Running tests..."
127+
echo "Running tests with coverage..."
128128
pnpm test:ci
129129
130130
# Check coverage if exists
131-
if [ -f "coverage/lcov.info" ]; then
131+
if [ -f "coverage/lcov.info" ] || [ -f "__reports__/test-coverage/lcov.info" ]; then
132132
echo "Coverage report generated"
133133
fi
134134
135+
- name: Upload coverage to Codecov
136+
if: steps.validate-branch.outputs.should_publish == 'true'
137+
uses: codecov/codecov-action@v4
138+
continue-on-error: true
139+
with:
140+
token: ${{ secrets.CODECOV_TOKEN }}
141+
files: ./__reports__/test-coverage/coverage-final.json,./__reports__/test-coverage/lcov.info
142+
flags: production
143+
name: codecov-production
144+
fail_ci_if_error: false
145+
verbose: true
146+
135147
- name: Build package
136148
if: steps.validate-branch.outputs.should_publish == 'true'
137149
run: |

.github/workflows/pr-validation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ jobs:
9191
id: test-validation
9292
continue-on-error: true
9393
run: |
94-
echo "Running tests..."
94+
echo "Running tests with coverage..."
9595
9696
if pnpm run --help | grep -q "test"; then
97-
if pnpm test; then
97+
if pnpm run test:coverage; then
9898
echo "✅ Tests passed"
9999
echo "tests_valid=true" >> $GITHUB_OUTPUT
100100
else

codecov.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Codecov configuration for @kubit-ui-web/react-components
2+
# https://docs.codecov.com/docs/codecov-yaml
3+
4+
# Coverage configuration
5+
coverage:
6+
precision: 2
7+
round: down
8+
range: '70...100'
9+
10+
status:
11+
project:
12+
default:
13+
target: 80%
14+
threshold: 2%
15+
if_ci_failed: error
16+
17+
patch:
18+
default:
19+
target: 80%
20+
threshold: 5%
21+
if_ci_failed: error
22+
23+
# Comment configuration
24+
comment:
25+
layout: 'reach,diff,flags,tree,reach'
26+
behavior: default
27+
require_changes: false
28+
require_base: no
29+
require_head: yes
30+
31+
# Ignore patterns
32+
ignore:
33+
- '**/*.test.ts'
34+
- '**/*.test.tsx'
35+
- '**/*.stories.tsx'
36+
- '**/*.stories.ts'
37+
- '**/tests/**'
38+
- '**/__tests__/**'
39+
- '**/__mocks__/**'
40+
- '**/__fixtures__/**'
41+
- '.storybook/**'
42+
- 'bundle/**'
43+
- 'public/**'
44+
- '**/node_modules/**'
45+
- 'vite.config.mts'
46+
- 'vitest.config.ts'
47+
- 'vitest.setup.ts'
48+
- 'eslint.config.js'
49+
50+
# Flags for different test types
51+
flags:
52+
production:
53+
paths:
54+
- src/
55+
carryforward: true
56+
beta:
57+
paths:
58+
- src/
59+
carryforward: true

0 commit comments

Comments
 (0)