Skip to content

Commit

Permalink
Merge pull request #237 from rabbitmq/zerpet/ci-checks
Browse files Browse the repository at this point in the history
Add format check to CI
  • Loading branch information
michaelklishin authored Sep 27, 2023
2 parents 341b937 + f1c9ca4 commit c20dc69
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/static-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,27 @@ jobs:
with:
version: "2023.1.3"
install-go: false
build-tags: "rabbitmq.stream.test,rabbitmq.stream.e2e"
build-tags: "rabbitmq.stream.test,rabbitmq.stream.e2e"

format-check:
name: Check Go Formatting
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable

- name: Run gofmt check
run: |
go fmt ./...
changes=$(git status --porcelain)
if [ -n "$changes" ]; then
echo "The following Go files are not formatted correctly:"
echo "$changes"
exit 1
fi

0 comments on commit c20dc69

Please sign in to comment.