-
Notifications
You must be signed in to change notification settings - Fork 37
ci: upload unit test coverage to Codecov [RHIDP-13388] #2828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 14 commits into
redhat-developer:main
from
rm3l:RHIDP-13388--rhdh-operator-upload-generated-code-coverage-report-to-codecov-io
May 18, 2026
+102
−4
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8252a19
ci: upload unit test coverage to Codecov
rm3l 45788c3
ci: run lint, test and coverage upload unconditionally in nightly
rm3l a5d59bd
ci: add workflow to validate codecov.yml
rm3l f373249
ci: fail CI on Codecov upload errors
rm3l f1b2a01
ci: pin nightly Codecov upload to checked-out commit SHA
rm3l c16a97e
ci: add curl timeouts and retries to Codecov validator
rm3l 8ae8d9e
Apply suggestions from code review
rm3l 6a271e2
ci: rename CODECOV_COMMIT_SHA to COMMIT_SHA in nightly workflow
rm3l a6056a1
Merge remote-tracking branch 'upstream/main' into RHIDP-13388--rhdh-o…
rm3l 13584f9
Merge remote-tracking branch 'upstream/main' into RHIDP-13388--rhdh-o…
rm3l ae51116
Apply suggestions from code review
rm3l 28e2d36
Apply suggestion from @rm3l
rm3l 4387a85
Merge branch 'main' into RHIDP-13388--rhdh-operator-upload-generated-…
rm3l 67a6fa8
Merge branch 'main' into RHIDP-13388--rhdh-operator-upload-generated-…
rm3l File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Codecov config validator | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'codecov.yml' | ||
| - '.github/workflows/codecov-checks.yaml' | ||
| pull_request: | ||
| paths: | ||
| - 'codecov.yml' | ||
| - '.github/workflows/codecov-checks.yaml' | ||
|
|
||
| jobs: | ||
| codecov_validate: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| CODECOV_CONFIG_FILE: codecov.yml | ||
| CODECOV_VALIDATE_URL: https://codecov.io/validate | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - name: Validate codecov.yml | ||
| env: | ||
| CURL_OPTS: "--connect-timeout 10 --max-time 30 --retry 3 --retry-all-errors" | ||
| run: | | ||
| output=$(curl -s -w "\n%{http_code}" ${CURL_OPTS} --data-binary @"${CODECOV_CONFIG_FILE}" "${CODECOV_VALIDATE_URL}") | ||
| http_code=$(echo "$output" | tail -1) | ||
| body=$(echo "$output" | sed '$d') | ||
| echo "$body" | ||
| if [ "$http_code" -eq 200 ]; then | ||
| echo "${CODECOV_CONFIG_FILE} is valid" | ||
| exit 0 | ||
| fi | ||
| if [ "$http_code" -eq 400 ]; then | ||
| echo "${CODECOV_CONFIG_FILE} is invalid (HTTP $http_code)" | ||
| exit 1 | ||
| fi | ||
| echo "::warning ::Codecov validation endpoint returned HTTP $http_code after retries. This may be a transient issue — please re-run the job." | ||
| # Fail earlier on transient Codecov API issues, so we can catch the issue and eventually retry | ||
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| codecov: | ||
| require_ci_to_pass: true | ||
|
|
||
| coverage: | ||
| status: | ||
| project: | ||
| default: | ||
| target: auto | ||
| threshold: 1% | ||
| if_ci_failed: error | ||
| informational: true | ||
| patch: | ||
| default: | ||
| target: auto | ||
| threshold: 5% | ||
| if_ci_failed: error | ||
| informational: true | ||
|
|
||
| comment: | ||
| layout: "reach,diff,flags,files" | ||
| behavior: default | ||
| require_changes: true | ||
| require_base: false | ||
| require_head: true | ||
|
|
||
| flag_management: | ||
| individual_flags: | ||
| - name: unittests | ||
| carryforward: true | ||
| - name: nightly | ||
| carryforward: true | ||
|
|
||
| ignore: | ||
| - "api/**" | ||
| - "**/zz_generated*.go" | ||
| - "bundle/**" | ||
| - "config/**" | ||
| - "tests/**" | ||
| - "integration_tests/**" | ||
| - "hack/**" | ||
| - "cmd/main.go" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.