Skip to content

Commit

Permalink
ci: add windows to matrix tests
Browse files Browse the repository at this point in the history
Fixes #140

Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Nov 7, 2023
1 parent 087cefb commit 9d2132b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ on:
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
Expand Down
4 changes: 2 additions & 2 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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":
Expand Down
6 changes: 6 additions & 0 deletions magefiles/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"os"
"runtime"
"strings"
"time"

Expand Down Expand Up @@ -89,6 +90,11 @@ func testImpl(impl string) error {
return errors.New("unknown `gokv.Store` implementation")
}

// TODO: until docker images for windows appear, skip those test for windows
if dockerCmd != "" && runtime.GOOS == "windows" {
return nil
}

// For some implementations there's no way to test with a Docker container yet.
// For them we skip the Docker stuff but still execute the tests, which can skip on connection error and we can see the skips in the test results.
if dockerCmd != "" {
Expand Down

0 comments on commit 9d2132b

Please sign in to comment.