From 385aa6c9199227bbb9514c1d62da08b0b8d0d9d3 Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 11 Mar 2023 07:45:16 +0400 Subject: [PATCH] ci: fix go tool usage on Windows --- .github/workflows/go.yml | 4 +++- musttag_test.go | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 00624df..39149f0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,7 +23,9 @@ jobs: go-version: ${{ matrix.go }} - name: Run tests - run: go test -race -shuffle=on -coverprofile=coverage.out ./... + # do not use `=` to join flags and values, it won't work on Windows; + # see https://github.com/PowerShell/PowerShell/issues/6291 for details. + run: go test -v -race -shuffle on -coverprofile coverage.out ./... - name: Upload coverage uses: codecov/codecov-action@v3 diff --git a/musttag_test.go b/musttag_test.go index c7ad37f..cbcf43b 100644 --- a/musttag_test.go +++ b/musttag_test.go @@ -12,9 +12,9 @@ import ( ) func TestAnalyzer(t *testing.T) { - // NOTE(junk1tm): analysistest does not yet support modules - // (see https://github.com/golang/go/issues/37054 for details). - // So, to be able to run tests with external dependencies, + // NOTE(junk1tm): analysistest does not yet support modules; + // see https://github.com/golang/go/issues/37054 for details. + // To be able to run tests with external dependencies, // we first need to write a GOPATH-like tree of stubs. prepareTestFiles(t) testPackages = []string{"tests", "builtins"}