diff --git a/.github/workflows/_scheduled-test-daily.yml b/.github/workflows/_scheduled-test-daily.yml index 572dd408..a8727217 100644 --- a/.github/workflows/_scheduled-test-daily.yml +++ b/.github/workflows/_scheduled-test-daily.yml @@ -330,6 +330,7 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} slug: aignostics/python-sdk + flags: ${{ inputs.platform_environment }} - name: Upload test results to Codecov if: ${{ !cancelled() && (env.GITHUB_WORKFLOW_RUNTIME != 'ACT') }} diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 85c4b021..63877f86 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -251,6 +251,9 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} slug: aignostics/python-sdk + # No flag: unflagged uploads feed the "default" project check. + # Codecov's default check excludes flagged uploads, making PR vs + # main comparison symmetric (both sides see only this CI upload). - name: Upload test results to Codecov if: | diff --git a/codecov.yml b/codecov.yml index 20fe235b..bca6dde1 100644 --- a/codecov.yml +++ b/codecov.yml @@ -3,9 +3,27 @@ coverage: status: project: default: - target: 70% + # PRs upload without a flag → only unflagged CI uploads count here. + # Scheduled test uploads use flags (staging/production) and are excluded + # from this check, making PR vs main comparison symmetric (~65% each). + target: auto + threshold: 2% informational: false + scheduled_environments: + flags: + - staging + - production + informational: true + if_not_found: success patch: default: target: 75% informational: false + +flags: + staging: + carryforward: false + if_not_found: success + production: + carryforward: false + if_not_found: success