Skip to content

Commit

Permalink
ci: add mac os to matrix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Dec 27, 2023
1 parent 0b9cc3b commit 366fb51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
go: [ '1.19', '1.20', '1.21' ]
os: [windows-latest, ubuntu-latest]
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -25,6 +25,12 @@ jobs:
version: v1.15.0
install-only: true

- name: Setup docker (missing on MacOS)
if: contains(runner.os, 'macos')
run: |
brew install docker
colima start
- run: |
go version
go env
Expand Down
11 changes: 6 additions & 5 deletions magefiles/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ func testImpl(impl string) (err error) {
return errors.New("unknown `gokv.Store` implementation")
}

// TODO: until docker images for windows appear, skip those test for windows
if dockerImage != "" && 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 dockerImage != "" {

// TODO: until docker images for windows and darwin appear, skip those tests
if runtime.GOOS == "windows" || runtime.GOOS == "darwin" {
return nil
}

// Pull Docker image
fmt.Printf("Pulling Docker image %s...", dockerImage)
var out string
Expand Down

0 comments on commit 366fb51

Please sign in to comment.