-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: fix validation and test workflows
- Loading branch information
1 parent
a168f38
commit df95102
Showing
2 changed files
with
13 additions
and
17 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 |
---|---|---|
|
@@ -18,11 +18,9 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- name: Install Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.20 | ||
uses: actions/[email protected] | ||
- name: Install dependencies | ||
run: go mod tidy | ||
run: go mod download | ||
- name: Run local-setup | ||
run: | | ||
git clone https://github.com/matter-labs/local-setup.git | ||
|
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 |
---|---|---|
|
@@ -17,21 +17,19 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- name: Install Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.20 | ||
uses: actions/[email protected] | ||
- name: Run gofmt | ||
run: | | ||
echo "Checking code formatting..." | ||
gofmt -d -e . | ||
- name: Run golangci-lint | ||
run: | | ||
echo "Running linter..." | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
golangci-lint run ./... | ||
- name: Fail if issues found | ||
run: exit 1 | ||
if: ${{ failure() || success() }} | ||
fmt_output=$(gofmt -l .) | ||
if [ -n "$fmt_output" ]; then | ||
echo "Code not formatted correctly:" | ||
echo "$fmt_output" | ||
exit 1 | ||
else | ||
echo "Code is formatted correctly" | ||
exit 0 | ||
fi | ||
commits: | ||
name: Check commits | ||
runs-on: ubuntu-latest | ||
|