2022-01-17 14:01:58 +01:00
|
|
|
name: Test Code Windows
|
2022-10-02 21:17:16 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
2022-06-24 14:50:14 +02:00
|
|
|
|
2023-04-13 17:00:01 +02:00
|
|
|
env:
|
|
|
|
downloadPath: '${{ github.workspace }}\temp'
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}
|
|
|
|
cancel-in-progress: true
|
2022-01-17 14:01:58 +01:00
|
|
|
|
2023-04-13 17:00:01 +02:00
|
|
|
jobs:
|
2022-01-17 14:01:58 +01:00
|
|
|
test:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-04-13 17:00:01 +02:00
|
|
|
uses: actions/checkout@v3
|
2022-01-17 14:01:58 +01:00
|
|
|
|
|
|
|
- name: Install Go
|
2023-04-13 17:00:01 +02:00
|
|
|
uses: actions/setup-go@v4
|
|
|
|
id: go
|
2022-01-17 14:01:58 +01:00
|
|
|
with:
|
2023-04-27 17:50:45 +02:00
|
|
|
go-version: "1.20.x"
|
2022-01-17 14:01:58 +01:00
|
|
|
|
2023-04-13 17:00:01 +02:00
|
|
|
- name: Download wintun
|
|
|
|
uses: carlosperate/download-file-action@v2
|
|
|
|
id: download-wintun
|
2022-01-17 14:01:58 +01:00
|
|
|
with:
|
2023-04-13 17:00:01 +02:00
|
|
|
file-url: https://www.wintun.net/builds/wintun-0.14.1.zip
|
|
|
|
file-name: wintun.zip
|
|
|
|
location: ${{ env.downloadPath }}
|
|
|
|
sha256: '07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51'
|
|
|
|
|
|
|
|
- name: Decompressing wintun files
|
|
|
|
run: tar -zvxf "${{ steps.download-wintun.outputs.file-path }}" -C ${{ env.downloadPath }}
|
|
|
|
|
|
|
|
- run: mv ${{ env.downloadPath }}/wintun/bin/amd64/wintun.dll 'C:\Windows\System32\'
|
|
|
|
|
|
|
|
- run: choco install -y sysinternals
|
|
|
|
- run: PsExec64 -s -w ${{ github.workspace }} C:\hostedtoolcache\windows\go\${{ steps.go.outputs.go-version }}\x64\bin\go.exe env -w GOMODCACHE=C:\Users\runneradmin\go\pkg\mod
|
|
|
|
- run: PsExec64 -s -w ${{ github.workspace }} C:\hostedtoolcache\windows\go\${{ steps.go.outputs.go-version }}\x64\bin\go.exe env -w GOCACHE=C:\Users\runneradmin\AppData\Local\go-build
|
2022-01-17 14:01:58 +01:00
|
|
|
|
2023-04-13 17:00:01 +02:00
|
|
|
- name: test
|
|
|
|
run: PsExec64 -s -w ${{ github.workspace }} cmd.exe /c "C:\hostedtoolcache\windows\go\${{ steps.go.outputs.go-version }}\x64\bin\go.exe test -timeout 5m -p 1 ./... > test-out.txt 2>&1"
|
|
|
|
- name: test output
|
|
|
|
if: ${{ always() }}
|
|
|
|
run: Get-Content test-out.txt
|