Skip to content

<CI>(workflow): restore Codecov unit-test coverage upload#958

Merged
kyonRay merged 1 commit into
FISCO-BCOS:release-3.9.0from
kyonRay:ci/enable-codecov-coverage
Jun 23, 2026
Merged

<CI>(workflow): restore Codecov unit-test coverage upload#958
kyonRay merged 1 commit into
FISCO-BCOS:release-3.9.0from
kyonRay:ci/enable-codecov-coverage

Conversation

@kyonRay

@kyonRay kyonRay commented Jun 23, 2026

Copy link
Copy Markdown
Member

What

Restores Codecov coverage reports on pull requests.

Why

Codecov stopped reporting coverage after commit 9837e924 (#941), which deleted the build-centos job. That job carried the only coverage-upload step in the workflow:

- name: upload unittest coverage
  run: curl -LO https://codecov.io/bash && /bin/bash ./bash

Since then the remaining build matrix job runs tests but never uploads a JaCoCo report, so Codecov has no data and posts no coverage report/comment on any PR. .codecov.yml and the jacoco plugin (jacocoTestReport, xml.enabled = true) are still configured — only the upload was missing.

Change

Adds a dedicated coverage job that:

  • runs the unit tests and generates the JaCoCo XML report via gradlew test jacocoTestReport;
  • uploads build/reports/jacoco/test/jacocoTestReport.xml to Codecov with the existing CODECOV_TOKEN secret (codecov/codecov-action@v4).

Notes:

  • Unit-test scope is intentional and matches .codecov.yml, which already ignores src/integration-test/** and src/integration-wasm-test/**. So this needs no live FISCO BCOS node and is fast/deterministic.
  • The job is continue-on-error: true, so it never blocks a PR.
  • No untrusted input is used in any run: step (only the CODECOV_TOKEN secret), so there is no workflow-injection surface.

🤖 Generated with Claude Code

Codecov coverage reports stopped appearing on PRs after the build-centos
job (which carried the only coverage upload step) was removed in 9837e92.
Add a dedicated 'coverage' job that runs the unit tests, generates the
JaCoCo XML report (jacocoTestReport, xml.enabled=true) and uploads it to
Codecov using the existing CODECOV_TOKEN secret. Unit-test scope matches
.codecov.yml, which already ignores src/integration-test and
src/integration-wasm-test. The job is continue-on-error so it never blocks
a PR.
Copilot AI review requested due to automatic review settings June 23, 2026 06:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-3.9.0@861d8f0). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-3.9.0     #958   +/-   ##
================================================
  Coverage                 ?   52.08%           
  Complexity               ?     4040           
================================================
  Files                    ?      430           
  Lines                    ?    17592           
  Branches                 ?     1962           
================================================
  Hits                     ?     9163           
  Misses                   ?     7699           
  Partials                 ?      730           
Flag Coverage Δ
unittest 52.08% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kyonRay kyonRay merged commit 401fb58 into FISCO-BCOS:release-3.9.0 Jun 23, 2026
7 of 11 checks passed
@kyonRay kyonRay deleted the ci/enable-codecov-coverage branch June 23, 2026 08:20
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants