File tree Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run CI Lint
2
+ on : push
3
+
4
+ jobs :
5
+ test :
6
+ strategy :
7
+ matrix :
8
+ os : [ubuntu-latest, macos-latest]
9
+ go : [1.16, 1.17]
10
+ name : ${{ matrix.os }} @ Go ${{ matrix.go }}
11
+ runs-on : ${{ matrix.os }}
12
+
13
+ env :
14
+ GO111MODULE : on
15
+ TESTTAGS : ${{ matrix.test-tags }}
16
+ GOPROXY : https://proxy.golang.org
17
+ steps :
18
+ - name : Set up Go ${{ matrix.go }}
19
+ uses : actions/setup-go@v2
20
+ with :
21
+ go-version : ${{ matrix.go }}
22
+
23
+ - name : Checkout Code
24
+ uses : actions/checkout@v2
25
+ with :
26
+ ref : ${{ github.ref }}
27
+
28
+ - name : golangci-lint
29
+ uses : golangci/golangci-lint-action@v2
30
+ with :
31
+ version : v1.42.0
Original file line number Diff line number Diff line change
1
+ name : Run Testing
2
+ on : push
3
+
4
+ jobs :
5
+ # Label of the container job
6
+ runner-job :
7
+ # You must use a Linux environment when using service containers or container jobs
8
+ runs-on : ubuntu-latest
9
+
10
+ # Service containers to run with `container-job`
11
+ services :
12
+ # Label used to access the service container
13
+ redis :
14
+ # Docker Hub image
15
+ image : redis
16
+ # Set health checks to wait until redis has started
17
+ options : >-
18
+ --health-cmd "redis-cli ping"
19
+ --health-interval 10s
20
+ --health-timeout 5s
21
+ --health-retries 5
22
+
23
+ env :
24
+ GO111MODULE : on
25
+ GOPROXY : https://proxy.golang.org
26
+ steps :
27
+ - name : Set up Go ${{ matrix.go }}
28
+ uses : actions/setup-go@v2
29
+
30
+ - name : Checkout Code
31
+ uses : actions/checkout@v2
32
+ with :
33
+ ref : ${{ github.ref }}
34
+
35
+ - name : Run Tests
36
+ run : |
37
+ go test -v -covermode=atomic -coverprofile=coverage.out .
38
+
39
+ - name : Upload coverage to Codecov
40
+ uses : codecov/codecov-action@v1
You can’t perform that action at this time.
0 commit comments