@@ -14,29 +14,20 @@ jobs:
14
14
lint :
15
15
strategy :
16
16
matrix :
17
- os : [ubuntu-latest, macos-latest]
18
- runs-on : ${{ matrix.os }}
19
- steps :
20
- - uses : actions/checkout@v3
21
- - uses : golangci/golangci-lint-action@v3
22
- lint-windows :
23
- strategy :
24
- matrix :
25
- os : [windows-latest]
17
+ os : [ubuntu-latest, macos-latest, windows-latest]
26
18
runs-on : ${{ matrix.os }}
27
19
steps :
28
20
- uses : actions/checkout@v3
29
21
- uses : golangci/golangci-lint-action@v3
30
22
with :
31
- args : --timeout 2m ./check-log/... ./check-procs/... ./check-ntservice/... ./check-windows-eventlog/...
23
+ args : --timeout 5m
32
24
test :
33
25
strategy :
34
26
matrix :
35
27
go : ["1.19.x", "1.18.x"]
36
- os : [ubuntu-latest]
28
+ os : [ubuntu-latest, windows-latest ]
37
29
runs-on : ${{ matrix.os }}
38
30
steps :
39
- - run : sudo apt-get install memcached
40
31
- uses : actions/setup-go@v2
41
32
with :
42
33
go-version : ${{ matrix.go }}
49
40
${{ runner.os }}-go-
50
41
- run : |
51
42
go test -race -covermode=atomic -coverprofile=prof.out ./...
43
+ shell: bash
44
+ - if : matrix.os == 'ubuntu-latest'
45
+ run : |
52
46
./test.bash
53
47
make testconvention
48
+ - if : matrix.os == 'windows-latest'
49
+ run : |
50
+ go build -o check-log/check-log.exe ./check-log
51
+ go build -o check-procs/check-procs.exe ./check-procs
52
+ go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
53
+ go build -o check-ntservice/check-ntservice.exe ./check-ntservice
54
+ go build -o check-disk/check-disk.exe ./check-disk
55
+ go build -o check-uptime/check-uptime.exe ./check-uptime
56
+ go build -o check-tcp/check-tcp.exe ./check-tcp
54
57
- uses : shogo82148/actions-goveralls@v1
55
58
with :
56
59
github-token : ${{ secrets.GITHUB_TOKEN }}
65
68
with :
66
69
github-token : ${{ secrets.GITHUB_TOKEN }}
67
70
parallel-finished : true
68
- test-windows :
69
- strategy :
70
- matrix :
71
- go : ["1.19.x", "1.18.x"]
72
- runs-on : windows-latest
73
- steps :
74
- - uses : actions/setup-go@v2
75
- with :
76
- go-version : ${{ matrix.go }}
77
- - uses : actions/checkout@v2
78
- - uses : actions/cache@v2
79
- with :
80
- path : ~/go/pkg/mod
81
- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
82
- restore-keys : |
83
- ${{ runner.os }}-go-
84
- - run : |
85
- go build -o check-log/check-log.exe ./check-log
86
- go build -o check-procs/check-procs.exe ./check-procs
87
- go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
88
- go test ./check-log/... ./check-procs/... ./check-ntservice/... ./check-windows-eventlog/...
89
71
build :
90
- needs : [ test, test-windows]
72
+ needs : test
91
73
runs-on : ubuntu-latest
92
74
if : github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
93
75
steps :
0 commit comments