We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be9e2d5 commit 20e01beCopy full SHA for 20e01be
1 file changed
.github/workflows/go.yml
@@ -0,0 +1,39 @@
1
+name: Go CLI
2
+
3
+on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
8
9
+jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v4
16
17
+ - name: Set up Go
18
+ uses: actions/setup-go@v5
19
+ with:
20
+ go-version: '1.22' # adjust to your Go version
21
22
+ - name: Cache Go modules
23
+ uses: actions/cache@v4
24
25
+ path: |
26
+ ~/go/pkg/mod
27
+ ~/.cache/go-build
28
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29
+ restore-keys: |
30
+ ${{ runner.os }}-go-
31
32
+ - name: Install dependencies
33
+ run: go mod tidy
34
35
+ - name: Run build
36
+ run: go build ./...
37
38
+ - name: Run tests
39
+ run: go test ./... -v
0 commit comments