Skip to content
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

Workflow for tracking coverage #17

Merged
merged 4 commits into from
Aug 27, 2024
Merged

Conversation

marcelofern
Copy link
Contributor

@marcelofern marcelofern commented Aug 25, 2024

GitHub Workflow For Printing Coverage Result

This PR adds a new GitHub Workflow that uses the coverage package (from Pypi) to run reports on the testing coverage.

This code could be swapped for, or enhanced by, a codecov subscription in future.

@marcelofern marcelofern force-pushed the workflow-for-tracking-coverage branch 2 times, most recently from 3f9b4ca to c951fbe Compare August 25, 2024 23:57
Copy link

github-actions bot commented Aug 25, 2024

Coverage Report Results

Name Stmts Miss Branch BrPart Cover
src/django_pg_migration_tools/__init__.py 0 0 0 0 100%
src/django_pg_migration_tools/management/__init__.py 0 0 0 0 100%
src/django_pg_migration_tools/management/commands/__init__.py 0 0 0 0 100%
src/django_pg_migration_tools/management/commands/migrate_with_timeouts.py 25 0 10 0 100%
src/django_pg_migration_tools/operations.py 58 1 6 2 95%
src/django_pg_migration_tools/timeouts.py 73 5 36 2 92%
TOTAL 156 6 52 4 94%

@marcelofern marcelofern force-pushed the workflow-for-tracking-coverage branch 7 times, most recently from 3ede9cf to be12c87 Compare August 26, 2024 00:19
This is not only unecessary but it is also a copy-paste issue as this
repo is definitely not called django_integrity.
@marcelofern marcelofern force-pushed the workflow-for-tracking-coverage branch 5 times, most recently from bf7708a to 9875ff2 Compare August 26, 2024 00:45
- name: Comment PR with coverage report
uses: thollander/actions-comment-pull-request@v2
with:
filePath: /tmp/coverage_report
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly I can't use $REPORT_PATH here as above. The actions-comment-pull-request Workflow doesn't seem to support env variables here.

@marcelofern marcelofern force-pushed the workflow-for-tracking-coverage branch from 9875ff2 to f482013 Compare August 26, 2024 01:28
uses: thollander/actions-comment-pull-request@v2
with:
filePath: /tmp/coverage_report
comment_tag: pr_comment
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is so that instead of creating new comments for each push, it just creates one and updates it if a new push has happened.

@marcelofern marcelofern marked this pull request as ready for review August 26, 2024 01:30
Copy link

@delfick delfick left a comment

Choose a reason for hiding this comment

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

Looks fine.

For papertrail, I asked outside of the PR why this couldn't be added on top of the existing tests and answer is speed. So the choice is to run code coverage on only one combination that the tests run under.

@marcelofern marcelofern merged commit f48c8ab into main Aug 27, 2024
10 checks passed
@marcelofern marcelofern deleted the workflow-for-tracking-coverage branch August 27, 2024 03:41
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.

2 participants