Skip to content

Fix[CI]: Use correct Python version and enable coverage upload#10

Merged
dkargatzis merged 4 commits intomainfrom
fix/ci-python-setup-and-coverage
Jul 30, 2025
Merged

Fix[CI]: Use correct Python version and enable coverage upload#10
dkargatzis merged 4 commits intomainfrom
fix/ci-python-setup-and-coverage

Conversation

@dkargatzis
Copy link
Member

What’s Changed

  • Replaced uv python install with actions/setup-python@v5 to correctly set the runner’s Python version (3.12).
  • Updated pytest command to include --cov and --cov-report=xml, ensuring coverage is properly calculated and coverage.xml is generated.
  • This resolves an issue where the Codecov step was silently failing due to the missing coverage file.

Why

Without these fixes:

  • The CI may use the default Python version instead of the one defined in the matrix.
  • The Upload coverage reports step would fail silently since no coverage.xml was produced.

Signed-off-by: Dimitris Kargatzis <dkargatzis@gmail.com>
@dkargatzis dkargatzis requested a review from cgoncalves94 July 28, 2025 14:41
@dkargatzis dkargatzis self-assigned this Jul 28, 2025
@dkargatzis dkargatzis added the bug Something isn't working label Jul 28, 2025
@watchflow
Copy link

watchflow bot commented Jul 28, 2025

Watchflow rules file not found

The file .watchflow/rules.yaml is missing from your repository.

How to fix:

  1. Create a file at .watchflow/rules.yaml in your repository root.
  2. Add your rules in the following format:
    rules:
      - id: example-rule
        description: Example rule description
        ...
  3. Read the documentation for more details.

After adding the file, push your changes to re-run validation.

@dimeloper
Copy link
Contributor

Just wondering, what is the plan for the code coverage reporting? My suggestion would be to upload the reports on https://about.codecov.io/ - then we can get test coverage analysis reports within our PRs, for free 😄

See an example:
Google Chrome 2025-07-29 20 55 02

- Add CODECOV_TOKEN to Codecov action
- Create codecov.yml with 80% targets and minimal comment layout
- Only comment on coverage changes to reduce noise

Signed-off-by: Dimitris Kargatzis <dkargatzis@gmail.com>
Signed-off-by: Dimitris Kargatzis <dkargatzis@gmail.com>
@dkargatzis
Copy link
Member Author

@dimeloper It looks like repo was already using your approach but had a few things missing. I've included the token configuration and created a codecov.yml to customize the reporting behavior.

Btw, the comment is posted as require_changes: yes in the config, so it only shows when there are actual coverage changes - that's why you don't see a comment on this PR since it's just CI fixes.

Signed-off-by: Dimitris Kargatzis <dkargatzis@gmail.com>
@dkargatzis dkargatzis merged commit 24b9215 into main Jul 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants