diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 3b1375e..6384275 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] fail-fast: false steps: - uses: actions/checkout@v2 diff --git a/shared/testutils/testutils.go b/shared/testutils/testutils.go index f528ad6..7a93dde 100644 --- a/shared/testutils/testutils.go +++ b/shared/testutils/testutils.go @@ -160,20 +160,22 @@ func checkError(err error) { } func buildServer() { - for { - wd, err := os.Getwd() - if err != nil { - panic(fmt.Sprintf("failed to getwd: %v", err)) - } - if strings.HasSuffix(wd, "/hishtory") { - break - } - err = os.Chdir("../") - if err != nil { - panic(fmt.Sprintf("failed to chdir: %v", err)) - } - if wd == "/" { - panic("failed to cd into hishtory dir!") + if runtime.GOOS != "windows" { + for { + wd, err := os.Getwd() + if err != nil { + panic(fmt.Sprintf("failed to getwd: %v", err)) + } + if strings.HasSuffix(wd, "/hishtory") { + break + } + err = os.Chdir("../") + if err != nil { + panic(fmt.Sprintf("failed to chdir: %v", err)) + } + if wd == "/" { + panic("failed to cd into hishtory dir!") + } } } version, err := os.ReadFile("VERSION")