We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 126ff82 commit 3d95668Copy full SHA for 3d95668
1 file changed
.github/workflows/test.yaml
@@ -0,0 +1,42 @@
1
+name: Test
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
9
10
11
+jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
19
+ - name: Set up Go
20
+ uses: actions/setup-go@v4
21
+ with:
22
+ go-version: "1.23"
23
24
+ - name: Cache Go modules
25
+ uses: actions/cache@v3
26
27
+ path: ~/go/pkg/mod
28
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29
+ restore-keys: |
30
+ ${{ runner.os }}-go-
31
32
+ - name: Download dependencies
33
+ run: go mod download
34
35
+ - name: Run tests
36
+ run: go test -v ./...
37
38
+ - name: Run tests with coverage
39
+ run: go test -v -coverprofile=coverage.out ./...
40
41
+ - name: Upload coverage to Codecov
42
+ uses: codecov/codecov-action@v3
0 commit comments