Feature/kafka-and-rabbitmq #14
Workflow file for this run
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
name: Build | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build Project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.23 | |
- name: Run gofmt to check formatting | |
run: | | |
gofmt -l . | |
# If there are any unformatted files, the job fails | |
- name: Fail if files are unformatted | |
run: | | |
if [ -n "$(gofmt -l .)" ]; then | |
echo "Code is not formatted. Run 'gofmt' on your code."; | |
exit 1; | |
fi | |
- name: Build Project | |
run: go build ./... |