diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 685ea2e..01c90fb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/magefiles/test.go b/magefiles/test.go index 75a0a05..3d25fb8 100644 --- a/magefiles/test.go +++ b/magefiles/test.go @@ -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