Skip to content

ci: add codecov upload step to all CI pipelines - #135

Merged
justinchuby merged 2 commits into
mainfrom
justinchu/ci-codecov
Apr 9, 2026
Merged

ci: add codecov upload step to all CI pipelines#135
justinchuby merged 2 commits into
mainfrom
justinchu/ci-codecov

Conversation

@justinchuby

Copy link
Copy Markdown
Member

Summary

Adds coverage collection and Codecov upload steps to all test jobs across the CI pipeline, matching the pattern from onnx/ir-py.

Changes

main.yml

Job Flag Notes
smoke-test smoke Added --cov to pytest
synthetic-parity synthetic-parity Added --cov to both pytest invocations
golden-comparison golden Added --cov to pytest
test unittests Already had --cov; added upload steps
integration-fast integration Added --cov to pytest

gpu_tests.yml

Job Flag Notes
golden-tests (L4) gpu-l4 Added --cov to L4 pytest
golden-tests (L5) gpu-l5 Added --cov --cov-append to L5 pytest; combined coverage upload with gpu flag

nightly_l2.yml

Job Flag Notes
arch-validation arch-validation Added --cov to pytest

Pattern used

Each job now uploads both:

  1. Coverage (coverage.xml) using codecov/codecov-action@v6 with if: always()

Token: ${{ secrets.CODECOV_TOKEN }} (set as a repo secret for private repos; tokenless upload works for public repos).

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Add coverage collection (--cov=src --cov-report=xml --cov-branch) and
codecov upload steps to all test jobs across the CI pipeline:

- main.yml: smoke-test (flags: smoke), synthetic-parity (flags: synthetic-parity),
  golden-comparison (flags: golden), test (flags: unittests),
  integration-fast (flags: integration)
- gpu_tests.yml: golden-tests (flags: gpu, gpu-l4, gpu-l5)
- nightly_l2.yml: arch-validation (flags: arch-validation)

Each test job uploads both coverage (coverage.xml) and test results
(junit XML) to Codecov using `codecov/codecov-action@v6`, matching the
pattern used in onnx/ir-py. Token is read from ${{ secrets.CODECOV_TOKEN }}.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

Performance Comparison

Comparing c448d4fcf5bf50

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0%
bert (feature-extraction) num_nodes 61 61 +0.0%
falcon model_size_bytes 364 KB 364 KB +0.0%
falcon num_nodes 66 66 +0.0%
gemma2 model_size_bytes 428 KB 428 KB +0.0%
gemma2 num_nodes 107 107 +0.0%
gpt2 model_size_bytes 388 KB 388 KB +0.0%
gpt2 num_nodes 53 53 +0.0%
llama model_size_bytes 425 KB 425 KB +0.0%
llama num_nodes 61 61 +0.0%
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0%
llama (static-cache) num_nodes 58 58 +0.0%
mamba (ssm-text-generation) model_size_bytes 360 KB 360 KB +0.0%
mamba (ssm-text-generation) num_nodes 103 103 +0.0%
phi3 model_size_bytes 421 KB 421 KB +0.0%
phi3 num_nodes 61 61 +0.0%
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0%
phi3 (static-cache) num_nodes 58 58 +0.0%
qwen2 model_size_bytes 425 KB 425 KB +0.0%
qwen2 num_nodes 61 61 +0.0%
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0%
qwen2 (static-cache) num_nodes 58 58 +0.0%
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0%
qwen3_5_moe (hybrid-text-generation) num_nodes 275 275 +0.0%
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0%
qwen3_5_text (hybrid-text-generation) num_nodes 129 129 +0.0%
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0%
qwen3_5_vl (hybrid-qwen-vl) num_nodes 409 409 +0.0%
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0%
t5 (seq2seq) num_nodes 174 174 +0.0%
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0%
whisper (speech-to-text) num_nodes 128 128 +0.0%

No performance regressions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds pytest coverage collection and Codecov uploads (coverage + test results) across all CI workflows/jobs, following a shared pattern.

Changes:

  • Added --cov=src --cov-report=xml --cov-branch (and JUnit output where needed) to multiple pytest invocations.
  • Added codecov/codecov-action@v6 steps to upload coverage and report-type: test_results to upload JUnit results across workflows.
  • Combined GPU L4/L5 coverage via --cov-append and uploaded L4/L5 JUnit results separately.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/main.yml Adds coverage + Codecov upload steps to smoke, synthetic parity, golden comparison, unit tests, and integration-fast jobs.
.github/workflows/gpu_tests.yml Adds coverage collection for L4/L5 GPU golden tests and uploads combined coverage + per-suite JUnit results to Codecov.
.github/workflows/nightly_l2.yml Adds coverage collection and Codecov uploads to nightly L2 architecture validation job.

Comment thread .github/workflows/main.yml
Comment thread .github/workflows/main.yml
When golden test data is absent, the test step is skipped, leaving no
coverage.xml or golden-results.xml. The codecov upload steps now use
the same `steps.check_golden.outputs.has_golden == 'true'` guard as the
test step so they are skipped rather than failing or uploading nothing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby
justinchuby merged commit b99f532 into main Apr 9, 2026
19 of 20 checks passed
@justinchuby
justinchuby deleted the justinchu/ci-codecov branch April 9, 2026 21:09
justinchuby added a commit that referenced this pull request Apr 9, 2026
## Summary

Adds coverage collection and Codecov upload steps to all test jobs
across the CI pipeline, matching the pattern from
[onnx/ir-py](https://github.com/onnx/ir-py/blob/5291b8bb0b7104e9034dda6b9be9d43baf0d70ad/.github/workflows/main.yml#L64-L74).

## Changes

### `main.yml`
| Job | Flag | Notes |
|-----|------|-------|
| `smoke-test` | `smoke` | Added `--cov` to pytest |
| `synthetic-parity` | `synthetic-parity` | Added `--cov` to both pytest
invocations |
| `golden-comparison` | `golden` | Added `--cov` to pytest |
| `test` | `unittests` | Already had `--cov`; added upload steps |
| `integration-fast` | `integration` | Added `--cov` to pytest |

### `gpu_tests.yml`
| Job | Flag | Notes |
|-----|------|-------|
| `golden-tests` (L4) | `gpu-l4` | Added `--cov` to L4 pytest |
| `golden-tests` (L5) | `gpu-l5` | Added `--cov --cov-append` to L5
pytest; combined coverage upload with `gpu` flag |

### `nightly_l2.yml`
| Job | Flag | Notes |
|-----|------|-------|
| `arch-validation` | `arch-validation` | Added `--cov` to pytest |

## Pattern used

Each job now uploads both:
1. **Coverage** (`coverage.xml`) using `codecov/codecov-action@v6` with
`if: always()`

Token: `${{ secrets.CODECOV_TOKEN }}` (set as a repo secret for private
repos; tokenless upload works for public repos).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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