From 01e19a7c6716264319c6d226ad10df80e8d45333 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Sat, 8 Apr 2023 13:12:13 +0200 Subject: [PATCH] set unrestricted policy --- .github/workflows/golang-test-windows.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golang-test-windows.yml b/.github/workflows/golang-test-windows.yml index 36d851ad1..5782b61e3 100644 --- a/.github/workflows/golang-test-windows.yml +++ b/.github/workflows/golang-test-windows.yml @@ -46,12 +46,16 @@ jobs: $WebClient.DownloadString("https://raw.githubusercontent.com/mkellerman/Invoke-CommandAs/master/Invoke-CommandAs/Public/Invoke-CommandAs.ps1") | Set-Content -Path ".\Invoke-CommandAs.ps1" - name: Generate Iface Test bin - run: go test -c -o ${{ github.workspace }}/iface-testing.bin.exe ./iface/ + run: go mod tidy + +# run: go test -c -o ${{ github.workspace }}/iface-testing.bin.exe ./iface/ - name: Test if: ${{ always() }} run: | + Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force Import-Module PSScheduledJob -UseWindowsPowerShell Import-Module ".\Invoke-ScheduledTask.ps1" Import-Module ".\Invoke-CommandAs.ps1" - Invoke-CommandAs -ScriptBlock { ${{ github.workspace }}/iface-testing.bin.exe } -AsSystem \ No newline at end of file + Invoke-CommandAs -ScriptBlock { whoami } -AsSystem +# Invoke-CommandAs -ScriptBlock { ${{ github.workspace }}/iface-testing.bin.exe } -AsSystem \ No newline at end of file