-
Notifications
You must be signed in to change notification settings - Fork 9
.github/workflows: add check-tidy #288
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
Conversation
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: go.sum | ||
go-version-file: go.mod | ||
|
||
- name: Ensure modules are tidy | ||
run: | | ||
go install github.com/jmank88/[email protected] | ||
gomods tidy | ||
git add --all | ||
git diff --minimal --cached --exit-code | ||
- name: Ensure mockery has been run | ||
run: | | ||
grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm | ||
find . -type f -name .mockery.yaml -execdir mockery \; | ||
git add --all | ||
git diff --stat --cached --exit-code |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
.github/workflows/aptos-relayer.yml
Outdated
- name: Ensure mockery has been run | ||
run: | | ||
grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm | ||
find . -type f -name .mockery.yaml -execdir mockery \; |
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.
mockery
is not installed, but nix appears to be using go-mockery
. How can we leverage that for this check?
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.
@archseer what about this repo? nix does not appear to be used by any CI currently. Is there a way to ensure that I have the same version installed if I just invoke it directly?
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.
@archseer bump
.github/workflows/aptos-relayer.yml
Outdated
|
||
- name: Run tests | ||
run: cd relayer && go test -v -count=1 -p=1 -tags=integration ./... | ||
run: cd relayer && go test -count=1 -tags=integration ./... |
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.
-p=1
slows things down to a single package at a time, and -v
adds all the noise of the successful tests to the logstream, crowding out the failed test logs.
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.
Restored -p=1
since we depend on that currently. Why are we limiting ourselves this way?
https://smartcontract-it.atlassian.net/browse/CRE-710
Related: