forked from m-kraus/check_nsc_web
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (54 loc) · 1.56 KB
/
citest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: citest
on:
push:
pull_request:
# set go version for all steps
env:
GOVERSION: 1.22.x
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: ${{ env.GOVERSION }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: make clean
- run: make citest
- run: make
- name: extract built binary
uses: actions/upload-artifact@v3
with:
name: check_nsc_web-go${{ matrix.go-version }}
path: check_nsc_web
- run: make clean
integration:
strategy:
fail-fast: false
matrix:
go-version: ${{ env.GOVERSION }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: |
echo "Testing with ${{ env.GOVERSION }}"
go work init
go work use .
$Env:GOWORK = "off"
go mod vendor
$Env:GOWORK = ""
# build check_nsc_web
go build -o ./check_nsc_web.exe cmd/check_nsc_web/main.go
# install nscp
Invoke-WebRequest -UseBasicParsing -Uri https://github.com/mickem/nscp/releases/download/0.5.2.35/NSCP-0.5.2.35-x64.msi -OutFile NSCP-0.5.2.35-x64.msi
msiexec /i NSCP-0.5.2.35-x64.msi /qn CONF_WEB=1 NSCLIENT_PWD=test
.\check_nsc_web.exe -vv -k -p test -u https://127.0.0.1:8443 ; if ($LASTEXITCODE -ne 0) { exit 1 }