combine test, test-windows
@@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
go: ["1.19.x", "1.18.x"]
- os: [ubuntu-latest]
+ os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v2
@@ -40,8 +40,20 @@ jobs:
${{ runner.os }}-go-
- run: |
go test -race -covermode=atomic -coverprofile=prof.out ./...
+ shell: bash
+ - if: matrix.os == 'ubuntu-latest'
+ run: |
./test.bash
make testconvention
+ - if: matrix.os == 'windows-latest'
+ run: |
+ go build -o check-log/check-log.exe ./check-log
+ go build -o check-procs/check-procs.exe ./check-procs
+ go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
+ go build -o check-ntservice/check-ntservice.exe ./check-ntservice
+ go build -o check-disk/check-disk.exe ./check-disk
+ go build -o check-uptime/check-uptime.exe ./check-uptime
+ go build -o check-tcp/check-tcp.exe ./check-tcp
- uses: shogo82148/actions-goveralls@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -56,33 +68,8 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
- test-windows:
- strategy:
- matrix:
- go: ["1.19.x", "1.18.x"]
- runs-on: windows-latest
- steps:
- - uses: actions/setup-go@v2
- with:
- go-version: ${{ matrix.go }}
- - uses: actions/checkout@v2
- - uses: actions/cache@v2
- with:
- path: ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
- - run: |
- go build -o check-log/check-log.exe ./check-log
- go build -o check-procs/check-procs.exe ./check-procs
- go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
- go build -o check-ntservice/check-ntservice.exe ./check-ntservice
- go build -o check-disk/check-disk.exe ./check-disk
- go build -o check-uptime/check-uptime.exe ./check-uptime
- go build -o check-tcp/check-tcp.exe ./check-tcp
- go test -v ./...
build:
- needs: [test, test-windows]
+ needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
steps:
