Skip to content

fix(ci): restore coverage reporting after runner label migration - #248

Merged
edis-uipath merged 1 commit into
mainfrom
mer/fix-coverage-reporting
Aug 11, 2026
Merged

fix(ci): restore coverage reporting after runner label migration#248
edis-uipath merged 1 commit into
mainfrom
mer/fix-coverage-reporting

Conversation

@PopescuTudor

@PopescuTudor PopescuTudor commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

SonarCloud has reported 0% coverage on main since 2026-08-06, which re-opened the MER code-coverage KPI (PRODEV-612).

PR #246 renamed the test matrix runners:

os: [uipath-ubuntu-latest, uipath-windows-latest]   # renamed

but the step conditions still compare against the old labels:

if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'   # never true now

So on every run since:

  1. Run tests with coverageskipped
  2. Upload coverage XML reportskipped (no artifact)
  3. Download coverage in the sonarcloud job → misses it, swallowed by continue-on-error: true
  4. SonarCloud scans with no report → 0% coverage

CI stayed ✅ green because the inverse condition !(...) became always-true, so plain pytest ran on all six combinations.

Evidence from the Aug-6 run (test / Test (3.13, uipath-ubuntu-latest)):

success   Run tests
skipped   Run tests with coverage
skipped   Upload coverage XML report

Fix

Use endsWith(matrix.os, 'ubuntu-latest') so the conditions match both the current uipath- prefixed labels and any future prefix change.

Exactly one job (uipath-ubuntu-latest + Python 3.13) produces coverage again — same as the original design.

Verification

Tests are unaffected — only the CI plumbing broke. On this commit, locally:

  • 203 passed
  • coverage 98.39% (1177 stmts, 19 missed)

After merge, the SonarCloud analysis on main should return to ~98%.

🤖 Generated with Claude Code

PR #246 renamed the test matrix runners from `ubuntu-latest`/`windows-latest`
to `uipath-ubuntu-latest`/`uipath-windows-latest`, but the step conditions
still compared against the old labels. `matrix.os == 'ubuntu-latest'` can
never be true now, so:

- "Run tests with coverage" was skipped on every job
- no coverage.xml artifact was uploaded
- the SonarCloud job's download silently missed it (continue-on-error)
- SonarCloud has reported 0% coverage since 2026-08-06

CI stayed green because the inverse condition became always-true, so plain
pytest ran on all six combinations.

Use endsWith(matrix.os, 'ubuntu-latest') so the conditions keep matching if
the runner prefix changes again. Tests themselves are unaffected: 203 pass
with 98.39% coverage locally on this commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 11, 2026 09:26

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.

Pull request overview

Restores CI coverage reporting by fixing GitHub Actions step conditions that stopped matching after runner labels were migrated to uipath-*, ensuring a single (Ubuntu + Python 3.13) matrix entry generates and uploads coverage artifacts for SonarCloud.

Changes:

  • Update if: conditions to use endsWith(matrix.os, 'ubuntu-latest') so they match uipath-ubuntu-latest.
  • Re-enable the “coverage” test run and the coverage HTML/XML artifact uploads for the intended single matrix combination.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sonarqubecloud

Copy link
Copy Markdown

@PopescuTudor PopescuTudor self-assigned this Aug 11, 2026
@edis-uipath
edis-uipath merged commit 5ae8ffa into main Aug 11, 2026
22 checks passed
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.

3 participants