2022-01-17 14:01:58 +01:00
|
|
|
name: Test Code Windows
|
2022-01-25 09:40:28 +01:00
|
|
|
on: [push,pull_request]
|
2022-01-17 14:01:58 +01:00
|
|
|
jobs:
|
|
|
|
pre:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- run: bash -x wireguard_nt.sh
|
|
|
|
working-directory: client
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: syso
|
|
|
|
path: client/*.syso
|
|
|
|
retention-days: 1
|
|
|
|
|
|
|
|
test:
|
|
|
|
needs: pre
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-22 14:59:17 +01:00
|
|
|
go-version: [1.18.x]
|
2022-01-17 14:01:58 +01:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2022-03-16 11:02:06 +01:00
|
|
|
- name: disable defender
|
|
|
|
run: Set-MpPreference -DisableRealtimeMonitoring $true
|
|
|
|
|
2022-01-17 14:01:58 +01:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
%LocalAppData%\go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
2022-03-16 11:02:06 +01:00
|
|
|
- name: enable defender
|
|
|
|
run: Set-MpPreference -DisableRealtimeMonitoring $false
|
|
|
|
|
2022-01-17 14:01:58 +01:00
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: syso
|
|
|
|
path: iface\
|
|
|
|
|
2022-03-16 11:02:06 +01:00
|
|
|
# - name: Install modules
|
|
|
|
# run: go mod tidy
|
2022-01-17 14:01:58 +01:00
|
|
|
|
2022-01-25 09:40:28 +01:00
|
|
|
- name: Test
|
2022-03-16 11:02:06 +01:00
|
|
|
run: go test -tags=load_wgnt_from_rsrc -timeout 5m -p 1 ./...
|