Skip to content

Commit cb05a3b

Browse files
committed
add github action integration test
Signed-off-by: Sven Nierlein <sven@consol.de>
1 parent af6accd commit cb05a3b

File tree

1 file changed

+38
-9
lines changed

1 file changed

+38
-9
lines changed

.github/workflows/citest.yml

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ name: citest
22
on:
33
push:
44
pull_request:
5-
schedule:
6-
- cron: '30 4 * * 1'
5+
6+
# set go version for all steps
7+
env:
8+
GOVERSION: 1.22.x
9+
710
jobs:
811
test:
912
strategy:
1013
fail-fast: false
1114
matrix:
12-
go-version:
13-
- 1.22.x
14-
os: [ubuntu-latest]
15-
runs-on: ${{ matrix.os }}
15+
go-version: ${{ env.GOVERSION }}
16+
runs-on: ubuntu-latest
1617
steps:
17-
- uses: abbbi/github-actions-tune@v1
18+
- uses: actions/checkout@v4
1819
- name: Install Go
19-
uses: actions/setup-go@v4
20+
uses: actions/setup-go@v5
2021
with:
2122
go-version: ${{ matrix.go-version }}
22-
- uses: actions/checkout@v3
2323
- run: make clean
2424
- run: make citest
2525
- run: make
@@ -29,3 +29,32 @@ jobs:
2929
name: check_nsc_web-go${{ matrix.go-version }}
3030
path: check_nsc_web
3131
- run: make clean
32+
33+
integration:
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
go-version: ${{ env.GOVERSION }}
38+
runs-on: windows-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Install Go
42+
uses: actions/setup-go@v5
43+
with:
44+
go-version: ${{ matrix.go-version }}
45+
- run: |
46+
echo "Testing with ${{ env.GOVERSION }}"
47+
go work init
48+
go work use .
49+
$Env:GOWORK = "off"
50+
go mod vendor
51+
$Env:GOWORK = ""
52+
53+
# build check_nsc_web
54+
go build -o ./check_nsc_web.exe cmd/check_nsc_web/main.go
55+
56+
# install nscp
57+
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
58+
msiexec /i NSCP-0.5.2.35-x64.msi /qn CONF_WEB=1 NSCLIENT_PWD=test
59+
60+
.\check_nsc_web.exe -vv -k -p test -u https://127.0.0.1:8443 ; if ($LASTEXITCODE -ne 0) { exit 1 }

0 commit comments

Comments
 (0)