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 5f64648
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
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
20 changes: 10 additions & 10 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
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 5f64648

Please sign in to comment.