Skip to content

Commit

Permalink
fix: correct coverage file handling in CI workflow
Browse files Browse the repository at this point in the history
- Update Docker volume mount point from /coverage to /app
- Specify exact coverage.xml output path in pytest command
- Remove unnecessary cp command as coverage file is now generated directly in mounted volume
  • Loading branch information
JayDoubleu committed Dec 8, 2024
1 parent 818cba8 commit 9716019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Build and run tests in Docker
run: |
docker build -t tweakslite-tests .
docker run --rm -v ${PWD}:/coverage tweakslite-tests cp coverage.xml /coverage/
docker run --rm -v ${PWD}:/app tweakslite-tests
- name: Upload coverage
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ RUN /root/.cargo/bin/uv pip install pygobject && \
/root/.cargo/bin/uv pip install -r tests/requirements-test.txt

# Command to run tests
CMD ["dbus-run-session", "--", "pytest", "tests/", "--cov=tweakslite", "--cov-report=xml"]
CMD ["dbus-run-session", "--", "pytest", "tests/", "--cov=tweakslite", "--cov-report=xml:./coverage.xml"]

0 comments on commit 9716019

Please sign in to comment.