-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: introduce protobuf gen parity CI check (#61)
- Loading branch information
Showing
5 changed files
with
27 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ jobs: | |
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Setup Cache | ||
|
@@ -74,19 +75,21 @@ jobs: | |
check-latest: true | ||
cache-dependency-path: go.work.sum | ||
|
||
- name: Workspace Modules | ||
- name: Determine Workspace Modules | ||
run: | | ||
echo $(go list -f '{{.Dir}}' -m) | ||
echo "GO_LINT_DIRS=$(go list -f '{{.Dir}}/...' -m | grep -v '/external/geth' | tr '\n' ' ')" >> $GITHUB_ENV | ||
- name: Run Gofmt | ||
run: go list -f '{{.Dir}}' -m | xargs gofmt -d -e -l | ||
|
||
- name: Run Tidy | ||
run: go list -f '{{.Dir}}' -m | xargs -L1 go mod tidy -C | ||
|
||
- name: Run Sync | ||
run: go work sync | ||
- name: Run Tidy & Workspace Sync | ||
run: | | ||
go list -f '{{.Dir}}' -m | xargs -L1 go mod tidy -C | ||
go work sync | ||
git checkout ${{ github.event.pull_request.head.ref }} | ||
git diff --name-only --exit-code . || (echo "Golang modules/workspace not in sync with go.mod/go.sum/go.work files" && exit 1) | ||
git reset --hard HEAD | ||
- name: Run Lint | ||
uses: golangci/golangci-lint-action@v4 | ||
|
@@ -102,6 +105,20 @@ jobs: | |
- name: Run Test | ||
run: go list -f '{{.Dir}}/...' -m | grep -v '/external/geth' | xargs go test -short -race | ||
|
||
- name: Setup Protobuf | ||
uses: bufbuild/[email protected] | ||
|
||
- name: Protobuf version | ||
run: buf --version | ||
|
||
- name: Check Protobuf Parity | ||
run: | | ||
make bufgen | ||
git checkout ${{ github.event.pull_request.head.ref }} | ||
git diff --name-only --exit-code . || (echo "Generated files not in parity with the source files." && exit 1) | ||
git reset --hard HEAD | ||
working-directory: p2p | ||
|
||
foundry: | ||
name: Foundry Checks and Reports | ||
runs-on: ubuntu-latest | ||
|
@@ -188,5 +205,6 @@ jobs: | |
run: | | ||
bash script.sh | ||
git checkout ${{ github.event.pull_request.head.ref }} | ||
git diff --name-only --exit-code . | ||
git diff --name-only --exit-code . || (echo "Generated files not in parity with the source files." && exit 1) | ||
git reset --hard HEAD | ||
working-directory: contracts-abi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters