We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25d47fd commit 301c715Copy full SHA for 301c715
.github/workflows/ci.yml
@@ -0,0 +1,35 @@
1
+name: Go Build, Test, and Format
2
+
3
+on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
8
9
+jobs:
10
+ build-test-format:
11
+ runs-on: ubuntu-latest
12
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
17
+ - name: Set up Go
18
+ uses: actions/setup-go@v5
19
+ with:
20
+ go-version: '1.24.4'
21
22
+ - name: Build
23
+ run: go build ./...
24
25
+ - name: Run Tests
26
+ run: go test ./...
27
28
+ - name: Check gofmt
29
+ run: |
30
+ UNFORMATTED=$(gofmt -l .)
31
+ if [ -n "$UNFORMATTED" ]; then
32
+ echo "The following files need to be formatted:"
33
+ echo "$UNFORMATTED"
34
+ exit 1
35
+ fi
0 commit comments