From 2606f95cd4c82688d141bd2d74610d10ca692392 Mon Sep 17 00:00:00 2001 From: Popescu Tudor-Cristian Date: Tue, 11 Aug 2026 12:25:52 +0300 Subject: [PATCH] fix(ci): restore coverage reporting after runner label migration 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 --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 070df04..0e1cc22 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,15 +35,15 @@ jobs: run: uv sync --all-extras - name: Run tests - if: "!(matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13')" + if: "!(endsWith(matrix.os, 'ubuntu-latest') && matrix.python-version == '3.13')" run: uv run pytest - name: Run tests with coverage - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' + if: endsWith(matrix.os, 'ubuntu-latest') && matrix.python-version == '3.13' run: uv run pytest --cov=src/uipath_mcp --cov-report=xml --cov-report=html --tb=short - name: Upload coverage HTML report - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && always() + if: endsWith(matrix.os, 'ubuntu-latest') && matrix.python-version == '3.13' && always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: coverage-html-report @@ -51,7 +51,7 @@ jobs: retention-days: 30 - name: Upload coverage XML report - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && always() + if: endsWith(matrix.os, 'ubuntu-latest') && matrix.python-version == '3.13' && always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: coverage-xml-report