Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/check-clean-branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# Exits if any uncommitted changes are found.

set -o errexit
set -o nounset
set -o pipefail

git update-index --really-refresh >> /dev/null
git diff-index --quiet HEAD
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,16 @@ jobs:
with:
name: tmpnet-data
path: ~/.tmpnet/networks/1000
mock_gen:
name: MockGen Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use v5 😉

Suggested change
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5

with:
go-version: ${{ env.min_go_version }}
check-latest: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we use the Go version specified and not the latest

Suggested change
check-latest: true

- shell: bash
run: scripts/mock.gen.sh
- shell: bash
run: .github/workflows/check-clean-branch.sh
Copy link
Contributor

@qdm12 qdm12 Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not directly inline the script content in there + remove .github/workflows/check-clean-branch.sh (one less file is always a win 😄)

Suggested change
run: .github/workflows/check-clean-branch.sh
run: |
git update-index --really-refresh >> /dev/null
git diff --exit-code

Also do we really need git update-index --really-refresh >> /dev/null? I never had the use case, I think git diff --exit-code should suffice to find diffs and exit with 1 if any diff is found.

EDIT: Happy to do the "sibling PR" in subnet-evm to have the same thing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied this from avalanchego repo which has this check. Not sure that it's needed. IMO we can close this PR and handle it in #721 (comment)

Loading