-
Notifications
You must be signed in to change notification settings - Fork 116
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
ci: update test workflow #1449
ci: update test workflow #1449
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.
LGTM, this looks much more sensible now.
Just a comment about SonarCloud.
go-version: "1.20" # The Go version to download (if necessary) and use. | ||
- name: Test with coverage | ||
run: go test -coverpkg=./x/... -coverprofile=coverage.out ./... | ||
- name: SonarCloud Scan |
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.
Should we not still have the Sonar Cloud scan? I don't see this in the workflow outputs anymore
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.
See
repo-analysis: |
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.
These are not the same thing afaict, see the details page for the SonarCloud job:
https://github.com/cosmos/interchain-security/pull/1443/checks?check_run_id=19046483938
https://github.com/cosmos/interchain-security/pull/1339/checks?check_run_id=19055224418
vs the details page of the repo analysis job
https://github.com/cosmos/interchain-security/actions/runs/7006381975/job/19058262889?pr=1449
the repo analysis job gives no useful info, or at least I can't see where to access it
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 difference is the if condition if: ${{ env.GIT_DIFF }}
, i.e.,
# before
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != null
# now
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }}
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
If you look at https://github.com/cosmos/interchain-security/actions/runs/7006381975/job/19058262889?pr=1449, you'll see that sonarcloud is not executed. That's because of the following lines
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
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.
Does something else stop it from running here? https://github.com/cosmos/interchain-security/actions/runs/7008218190/job/19064178033?pr=1456
I am changing lines in a .go file, and afaict it is also not excluded in the sonarcloud properties
NOTE: I think the job was started with the PR in draft mode, so I'm rerunning it just to make sure it's not that
Also doesn't run after restarting it in non-draft mode, I can't quite tell why it doesn't run. But we will have real PRs with the new workflow to confirm that it still works as expected soon enough, so no bother looking more at this right now I think
* update test workflow * rename Gosec job to avoid conflict
Description
Closes: #908
Separate test workflow.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...