name: Test Code Windows on: push: branches: - main pull_request: env: downloadPath: '${{ github.workspace }}\temp' jobs: test: runs-on: windows-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Install Go uses: actions/setup-go@v2 with: go-version: 1.19.x - uses: actions/cache@v2 with: path: | %LocalAppData%\go-build ~\go\pkg\mod ~\AppData\Local\go-build key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Download wintun uses: carlosperate/download-file-action@v2 id: download-wintun with: 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\' - name: Download PSTools uses: carlosperate/download-file-action@v2 id: download-pstools with: file-url: https://download.sysinternals.com/files/PSTools.zip file-name: PSTools.zip location: ${{ env.downloadPath }} - name: Decompressing PSTools files run: tar -zvxf "${{ steps.download-pstools.outputs.file-path }}" -C ${{ env.downloadPath }} - name: Test run: ${{ env.downloadPath }}\PsExec64.exe -s go test -timeout 5m -p 1 ./...