File tree Expand file tree Collapse file tree 2 files changed +55
-3
lines changed
Expand file tree Collapse file tree 2 files changed +55
-3
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,8 @@ jobs:
166166 run : |
167167 uv sync --group dev
168168
169- - name : Run critical tests with coverage
169+ - name : Run critical tests (PRs)
170+ if : github.event_name == 'pull_request'
170171 env :
171172 REDIS_URL : redis://localhost:6379
172173 run : |
@@ -177,14 +178,26 @@ jobs:
177178 --junitxml=junit.xml \
178179 -o junit_family=legacy
179180
181+ - name : Run full test suite (main)
182+ if : github.event_name == 'push'
183+ env :
184+ REDIS_URL : redis://localhost:6379
185+ run : |
186+ uv run pytest tests/ -m "not slow" \
187+ --cov=src/cachekit \
188+ --cov-report=xml \
189+ --cov-report=term \
190+ --junitxml=junit.xml \
191+ -o junit_family=legacy
192+
180193 - name : Upload coverage to Codecov
181194 if : ${{ !cancelled() }}
182195 uses : codecov/codecov-action@v5
183196 with :
184197 files : ./coverage.xml
185198 use_oidc : true
186199 fail_ci_if_error : false
187- flags : python-${{ matrix.python-version }}
200+ flags : ${{ github.event_name == 'push' && 'full' || 'critical' }}- python-${{ matrix.python-version }}
188201
189202 - name : Upload test results to Codecov
190203 if : ${{ !cancelled() }}
@@ -193,7 +206,7 @@ jobs:
193206 files : ./junit.xml
194207 report_type : test_results
195208 use_oidc : true
196- flags : python-${{ matrix.python-version }}
209+ flags : ${{ github.event_name == 'push' && 'full' || 'critical' }}- python-${{ matrix.python-version }}
197210 fail_ci_if_error : false
198211
199212 # Markdown documentation tests
Original file line number Diff line number Diff line change 1+ # Codecov Configuration
2+ # https://docs.codecov.com/docs/codecovyml-reference
3+
4+ coverage :
5+ status :
6+ project :
7+ default :
8+ target : auto
9+ threshold : 2% # Allow 2% coverage drop without failing
10+ patch :
11+ default :
12+ target : 80% # New code should have 80% coverage
13+
14+ # Flag configuration for PR vs main coverage strategy
15+ flag_management :
16+ default_rules :
17+ carryforward : true # Carry forward coverage from previous uploads
18+ statuses :
19+ - type : project
20+ - type : patch
21+
22+ individual_flags :
23+ # Full test suite (main branch only)
24+ - name : full-python-3.12
25+ carryforward : true
26+ paths :
27+ - src/cachekit/
28+
29+ # Critical tests (PRs) - carryforward from full coverage
30+ - name : critical-python-3.12
31+ carryforward : true
32+ carryforward_mode : labels
33+ paths :
34+ - src/cachekit/
35+
36+ comment :
37+ layout : " header, diff, flags, components"
38+ behavior : default
39+ require_changes : true # Only comment if coverage changed
You can’t perform that action at this time.
0 commit comments