Skip to content

Commit f998867

Browse files
committed
combine test, test-windows
1 parent c528223 commit f998867

File tree

1 file changed

+14
-27
lines changed

1 file changed

+14
-27
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
matrix:
2727
go: ["1.19.x", "1.18.x"]
28-
os: [ubuntu-latest]
28+
os: [ubuntu-latest, windows-latest]
2929
runs-on: ${{ matrix.os }}
3030
steps:
3131
- uses: actions/setup-go@v2
@@ -40,8 +40,20 @@ jobs:
4040
${{ runner.os }}-go-
4141
- run: |
4242
go test -race -covermode=atomic -coverprofile=prof.out ./...
43+
shell: bash
44+
- if: matrix.os == 'ubuntu-latest'
45+
run: |
4346
./test.bash
4447
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
4557
- uses: shogo82148/actions-goveralls@v1
4658
with:
4759
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -56,33 +68,8 @@ jobs:
5668
with:
5769
github-token: ${{ secrets.GITHUB_TOKEN }}
5870
parallel-finished: true
59-
test-windows:
60-
strategy:
61-
matrix:
62-
go: ["1.19.x", "1.18.x"]
63-
runs-on: windows-latest
64-
steps:
65-
- uses: actions/setup-go@v2
66-
with:
67-
go-version: ${{ matrix.go }}
68-
- uses: actions/checkout@v2
69-
- uses: actions/cache@v2
70-
with:
71-
path: ~/go/pkg/mod
72-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
73-
restore-keys: |
74-
${{ runner.os }}-go-
75-
- run: |
76-
go build -o check-log/check-log.exe ./check-log
77-
go build -o check-procs/check-procs.exe ./check-procs
78-
go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
79-
go build -o check-ntservice/check-ntservice.exe ./check-ntservice
80-
go build -o check-disk/check-disk.exe ./check-disk
81-
go build -o check-uptime/check-uptime.exe ./check-uptime
82-
go build -o check-tcp/check-tcp.exe ./check-tcp
83-
go test -v ./...
8471
build:
85-
needs: [test, test-windows]
72+
needs: test
8673
runs-on: ubuntu-latest
8774
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
8875
steps:

0 commit comments

Comments
 (0)