Skip to content

Commit f492ccb

Browse files
committed
ci: add mac os to matrix tests
Signed-off-by: Boris Glimcher <[email protected]>
1 parent 68e55ce commit f492ccb

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
go: [ '1.19', '1.20', '1.21' ]
13-
os: [windows-latest, ubuntu-latest]
13+
os: [windows-latest, macos-latest, ubuntu-latest]
1414
runs-on: ${{ matrix.os }}
1515
steps:
1616
- uses: actions/checkout@v3
@@ -22,6 +22,12 @@ jobs:
2222
version: v1.15.0
2323
install-only: true
2424

25+
- name: Setup docker (missing on MacOS)
26+
if: contains(runner.os, 'macos')
27+
run: |
28+
brew install docker
29+
colima start
30+
2531
- run: |
2632
go version
2733
go env

magefiles/test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,13 @@ func testImpl(impl string) error {
9090
return errors.New("unknown `gokv.Store` implementation")
9191
}
9292

93-
// TODO: until docker images for windows appear, skip those test for windows
94-
if dockerCmd != "" && runtime.GOOS == "windows" {
95-
return nil
96-
}
97-
9893
// For some implementations there's no way to test with a Docker container yet.
9994
// 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.
10095
if dockerCmd != "" {
96+
// TODO: until docker images for windows and darwin appear, skip those tests
97+
if runtime.GOOS == "windows" || runtime.GOOS == "darwin" {
98+
return nil
99+
}
101100
// Start Docker container
102101
var out string
103102
out, err = script.Exec(dockerCmd).String()

0 commit comments

Comments
 (0)