-
Notifications
You must be signed in to change notification settings - Fork 1
.github/workflows: add check-tidy #26
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
run: | | ||
pushd relayer | ||
nix develop -c go test -v -count=1 -p=1 -tags=integration ./... | ||
build-pkgs: | ||
name: Build and package (Nix and Docker) | ||
runs-on: ubuntu-latest | ||
|
@@ -48,3 +49,27 @@ | |
|
||
- name: Run build - Docker (via Docker builder) | ||
run: nix develop -c ./scripts/build/make-docker.sh --docker-builder | ||
|
||
check-tidy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f # v31 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
|
||
- name: Ensure modules are tidy | ||
run: | | ||
nix develop -c go run github.com/jmank88/[email protected] tidy | ||
git add --all | ||
git diff --minimal --cached --exit-code | ||
- name: Ensure mockery has been run | ||
run: | | ||
nix develop -c grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm | ||
nix develop -c go run github.com/jmank88/[email protected] -go generate ./... | ||
git add --all | ||
git diff --stat --cached --exit-code | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 2 months ago
To fix the problem, add a
permissions
block to the workflow file.github/workflows/relayer-build.yml
. The block should be placed at the top level (beforejobs:
) to apply to all jobs, unless a job requires different permissions. Based on the workflow, none of the jobs appear to require write access to repository contents, so the minimal starting point iscontents: read
. If in the future a job needs additional permissions (e.g., to create pull requests or write to issues), those can be added at the job level. The change involves inserting the following block after thename:
and before theon:
section:No additional imports, methods, or definitions are required.