Skip to content

Commit

Permalink
ci: fix validation and test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
danijelTxFusion committed Dec 22, 2023
1 parent a168f38 commit 305b28c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5.0.0
uses: actions/setup-go@v4.0.0
with:
go-version: 1.20
- 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
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ jobs:
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5.0.0
uses: actions/setup-go@v4.0.0
with:
go-version: 1.20
- 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
Expand Down

0 comments on commit 305b28c

Please sign in to comment.