-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make unit test coverage decrease more significant #90
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9aef14e
generate-cov-report
skyshaha1 6a4c162
needs build-test
skyshaha1 ab1aaf0
commented out the upload part of build-test
skyshaha1 6560be9
python script - should fail as i put it to fail when unchanged
skyshaha1 cacb1af
removed commented stuff, changed to decrease now - should pass
skyshaha1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,6 +109,29 @@ jobs: | |
name: coverage_report_stats | ||
path: build/coverage_statistics.txt | ||
|
||
checks-the-cov-report: | ||
name: Checks the Coverage Report | ||
|
||
# Runs on ubuntu | ||
runs-on: ubuntu-22.04 | ||
|
||
# Timeout after | ||
timeout-minutes: 2 | ||
|
||
# # Define the dependencies on the previous coverage jobs | ||
needs: [build-test] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
# Download the current coverage statistics | ||
- name: Download Current Coverage Statistics | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: coverage_report_stats | ||
path: build | ||
|
||
# Download current master coverage statistics | ||
- name: Download Master Coverage Statistics | ||
uses: dawidd6/action-download-artifact@v2 | ||
|
@@ -118,26 +141,27 @@ jobs: | |
branch: master | ||
name: coverage_report_stats | ||
path: master_artifacts | ||
|
||
# Run the process_coverage_stats script | ||
- name: Process Coverage Statistics | ||
if: ${{ success() && github.ref != 'refs/heads/master' }} | ||
run: python scripts/coverage/process_coverage_stats.py ./master_artifacts/coverage_statistics.txt build/coverage_statistics.txt | ||
|
||
# Get process_coverage_stats script output | ||
- id: get-comment-body | ||
if: ${{ success() && github.ref != 'refs/heads/master' }} | ||
if: ${{ (success() || failure()) && github.ref != 'refs/heads/master' }} | ||
run: | | ||
body="$(cat comparison_output.txt)" | ||
body="${body//'%'/'%25'}" | ||
body="${body//$'\n'/'%0A'}" | ||
body="${body//$'\r'/'%0D'}" | ||
echo "::set-output name=body::$body" | ||
|
||
# Create comment with coverage info | ||
- name: Create Coverage Comment | ||
if: ${{ success() && github.ref != 'refs/heads/master' }} | ||
if: ${{ (success() || failure()) && github.ref != 'refs/heads/master' }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that comparison needed? |
||
uses: peter-evans/create-or-update-comment@v2 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: ${{ steps.get-comment-body.outputs.body }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that comparison needed? It's always either success or failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I think by default, test steps are skipped if status is failure or cancelled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, just tested it out on a different branch and Luke is right, test steps are skipped if the status is failure or cancelled, so both are comparisons are required