Skip to content

Upload backend coverage report on failure #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 30, 2025
Merged

Upload backend coverage report on failure #39

merged 4 commits into from
May 30, 2025

Conversation

ejfine
Copy link
Contributor

@ejfine ejfine commented May 30, 2025

Why is this change necessary?

Trying to debug CI coverage failures

How does this change address the issue?

Adds step to upload HTML coverage report if failure

What side effects does this change have?

None

How is this change tested?

Downstream repo

Other

Ignoring changes to favicon and vendor files

@ejfine ejfine requested a review from Copilot May 30, 2025 11:30
@ejfine ejfine self-assigned this May 30, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds logic to upload the backend coverage report when CI fails, updates lint exclusions for vendor files, and prevents favicon from being overwritten by the template.

  • Excludes vendor_files/ directories from pre-commit checks.
  • Adjusts the backend unit-test step and adds a failure-only artifact upload.
  • Adds a copier directive to skip overwriting an existing favicon.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
template/.pre-commit-config.yaml.jinja Exclude vendor_files/ from formatting and snapshot checks
template/.github/workflows/ci.yaml.jinja Remove XML report, add HTML report upload step on failure
copier.yml Add _skip_if_exists for favicon to avoid overwriting
Comments suppressed due to low confidence (3)

template/.github/workflows/ci.yaml.jinja:65

  • The leading hyphen on the run: line creates a new unnamed step and breaks the YAML structure. It should be indented under the - name: Unit test step without an extra dash.
-        run: uv --directory=backend run pytest tests/unit --durations=5

template/.pre-commit-config.yaml.jinja:64

  • [nitpick] The same vendor_files exclusion appears in multiple repos; consider consolidating into a shared variable or block to reduce duplication.
.*\/vendor_files\/.*|

copier.yml:178

  • Copier’s standard key is skip_if_exists (without a leading underscore). Using _skip_if_exists may not have any effect—rename the key or confirm the correct directive.
_skip_if_exists:

@@ -63,7 +63,15 @@ jobs:
python-version: {% endraw %}{{ python_version }}{% raw %}

- name: Unit test
run: uv --directory=backend run pytest tests/unit --cov-report=xml --durations=5{% endraw %}{% endif %}{% raw %}
run: uv --directory=backend run pytest tests/unit --durations=5
Copy link
Preview

Copilot AI May 30, 2025

Choose a reason for hiding this comment

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

The coverage report is no longer generated since --cov-report=xml was removed; the upload step will have no files to send. Consider adding --cov-report=html:backend/coverage-report-pytest (or a similar option) to generate the directory you intend to upload.

Suggested change
run: uv --directory=backend run pytest tests/unit --durations=5
run: uv --directory=backend run pytest tests/unit --durations=5 --cov=backend --cov-report=html:backend/coverage-report-pytest

Copilot uses AI. Check for mistakes.

@ejfine ejfine merged commit 7e26715 into main May 30, 2025
11 checks passed
@ejfine ejfine deleted the coverage-report branch May 30, 2025 11:32
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.

1 participant