File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : test
3
+
4
+ on :
5
+ push :
6
+ branches :
7
+ - master
8
+ tags :
9
+ - v*
10
+ pull_request :
11
+ env :
12
+ DEBIAN_FRONTEND : noninteractive
13
+ jobs :
14
+ lint :
15
+ strategy :
16
+ matrix :
17
+ os : [ubuntu-latest]
18
+ runs-on : ${{ matrix.os }}
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ - uses : golangci/golangci-lint-action@v3
22
+ with :
23
+ args : --timeout 2m
24
+ test :
25
+ strategy :
26
+ matrix :
27
+ go : ["1.19.x", "1.18.x"]
28
+ os : [ubuntu-latest]
29
+ runs-on : ${{ matrix.os }}
30
+ steps :
31
+ - uses : actions/setup-go@v2
32
+ with :
33
+ go-version : ${{ matrix.go }}
34
+ - uses : actions/checkout@v2
35
+ - uses : actions/cache@v2
36
+ with :
37
+ path : ~/go/pkg/mod
38
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
39
+ restore-keys : |
40
+ ${{ runner.os }}-go-
41
+ - run : |
42
+ make test
43
+ - run : |
44
+ ./test.sh
Original file line number Diff line number Diff line change
1
+ .PHONY : build
2
+ build :
3
+ go build -o mackerel-plugin-mongodb
4
+
5
+ .PHONY : test
6
+ test : testgo build
7
+ go install github.com/lufia/graphitemetrictest/cmd/graphite-metric-test@latest
8
+ ./test.sh
9
+
10
+ .PHONY : testgo
11
+ testgo :
12
+ go test -v ./...
13
+
You can’t perform that action at this time.
0 commit comments