Skip to content

Commit

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

Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Oct 31, 2023
1 parent bfdf6b8 commit 725a448
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ name: test
on: [push, 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 All @@ -27,6 +29,8 @@ jobs:
- run: mage build
# Then lint, taking `.golangci.yml` into account
- uses: golangci/golangci-lint-action@v3
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
# Finally test all modules
# This starts and stops Docker containers for services like PostgreSQL, Redis etc.
# Takes up to 10m on GitHub Actions
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

0 comments on commit 725a448

Please sign in to comment.