Important interfacing for Coordinator #4
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: Go CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.21" # Use a valid Go version | |
- name: Run go fmt | |
run: | | |
go fmt ./... | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Code is not formatted. Please run 'go fmt ./...' locally and commit changes." | |
exit 1 | |
fi | |
- name: Run go vet | |
run: go vet ./... | |
- name: Run tests | |
run: go test ./... |