-
Notifications
You must be signed in to change notification settings - Fork 21
Running code coverage tests within the Sonar Cloud Static Scan action #93
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
base: main
Are you sure you want to change the base?
Conversation
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.
lgtm
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.
Requesting changes because I don't understand the discrepancy in steps and we should delete the commented-out code if it's not needed.
Broader question - we've now merged 4 PRs so far to configure sonar scans. How confident are we that the scans will be working after this?
I know it's difficult to test these changes without getting the code onto main
, but if the scans/coverage don't succeed after these changes, I would like to see this working in a sandbox repo (where you can PR/merge without approval) before bringing a PR back.
# - name: Fetch Code Coverage Report | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: coverage-report | ||
# path: . |
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.
Let's delete these rather than leaving them commented-out.
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.
I'd like to leave them in as I think we'd like to move to do this at some point instead of running the unit tests again.
# - name: Run unit tests with coverage | ||
# run: make testcov | ||
|
||
# - name: Upload code coverage report from unit tests | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: coverage-report | ||
# path: unit-testing.cov |
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.
Same feedback as above.
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.
I'd like to leave this in, as at some point we should try to get this working, instead of trying to run the code coverage tests again.
- name: Run unit tests with coverage | ||
run: make testcov |
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.
The unit_test_and_quality.yml
workflow where we're moving this from has more steps before this (go get
, go build
. Do we need those steps here? If we don't, why do we have them in the other workflow?
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.
If something fails in those discrete steps during the initial PR workflow, it's a bit easier to see and know what's failing. Once we get here, I don't see a point of splitting it all out again. This is a stop gap measure to get this working without trying to submit more PRs to get the upload / download of the code coverage working.
Unfortunately, I think this is how we have to work when we're making changes to github actions / workflows and CI, so there will always be some level of uncertainty until we run the workflows the way they are intended to run. |
Removed the code coverage generation from the main unit testing action, and placed it in the sonar scan action.