From 762875c22fe93e1ac9d28c89d80f3fc5197d8216 Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Tue, 31 Oct 2023 17:41:39 +0200 Subject: [PATCH] ci: add windows to matrix tests Fixes #140 Signed-off-by: Boris Glimcher --- .github/workflows/test.yml | 4 +++- magefiles/magefile.go | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 370ec77b..5426c7ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,10 +3,12 @@ name: test on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest strategy: + fail-fast: false matrix: go: [ '1.18', '1.19', '1.20', '1.21' ] + os: [windows-latest, ubuntu-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 diff --git a/magefiles/magefile.go b/magefiles/magefile.go index c9f17b5c..a2faba9d 100644 --- a/magefiles/magefile.go +++ b/magefiles/magefile.go @@ -17,7 +17,7 @@ import ( func Update() error { switch runtime.GOOS { case "windows": - return sh.Run("./build/update-deps.ps1") + return sh.Run("pwsh.exe", "./build/update-deps.ps1") case "darwin": fallthrough case "linux": @@ -30,7 +30,7 @@ func Update() error { func Build() error { switch runtime.GOOS { case "windows": - return sh.Run("./build/build.ps1") + return sh.Run("pwsh.exe", "./build/build.ps1") case "darwin": fallthrough case "linux":