From f7c86e8b2244a49ee2780a498af6a45480ded648 Mon Sep 17 00:00:00 2001 From: "Daniel G. Taylor" Date: Sun, 1 May 2022 23:11:43 -0700 Subject: [PATCH 1/2] fix: build on windows --- cli/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/auth.go b/cli/auth.go index ae0cc2f..79e5bc4 100644 --- a/cli/auth.go +++ b/cli/auth.go @@ -51,7 +51,7 @@ func (a *BasicAuth) OnRequest(req *http.Request, key string, params map[string]s if usernamePresent && !passwordPresent { fmt.Print("password: ") - inputPassword, err := term.ReadPassword(syscall.Stdin) + inputPassword, err := term.ReadPassword(int(syscall.Stdin)) if err == nil { params["password"] = string(inputPassword) } From bd59d7319986cfa3e5ddd3b15527c72c406eea9f Mon Sep 17 00:00:00 2001 From: "Daniel G. Taylor" Date: Sun, 1 May 2022 23:15:42 -0700 Subject: [PATCH 2/2] chore: test on linux and windows --- .github/workflows/ci.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bfc1182..c66656c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,8 +2,13 @@ name: CI on: [push] jobs: build: - runs-on: ubuntu-latest name: Build & Test + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + steps: - uses: actions/checkout@v2 - name: Setup go @@ -11,4 +16,8 @@ jobs: with: go-version: "1.18" - run: go test -coverprofile=coverage.txt -covermode=atomic ./... + if: matrix.os == 'ubuntu-latest' + - run: go test + if: matrix.os == 'windows-latest' - uses: codecov/codecov-action@v1 + if: matrix.os == 'ubuntu-latest'