Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add mac os to matrix tests #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading