Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Mar 13, 2023
1 parent 13f4652 commit d1e3c2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.17'

- name: Set environment
run: "GOCOVERDIR=." >> $GITHUB_ENV

- name: Build
run: go build -v ./...

- name: Test
run: GOCOVERDIR=. go test -race -count=1 -coverprofile=coverage.out ./...
run: go test -race -count=1 -coverprofile=coverage.out ./...

- name: Coverage
uses: codecov/codecov-action@v3
Expand All @@ -35,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.17'

Expand Down
2 changes: 1 addition & 1 deletion minify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func helperCommand(t *testing.T, s ...string) *exec.Cmd {
cs := []string{"-test.run=TestHelperProcess", "--"}
cs = append(cs, s...)
cmd := exec.Command(os.Args[0], cs...)
cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"}
cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1", "GOCOVERDIR=."}
return cmd
}

Expand Down

0 comments on commit d1e3c2f

Please sign in to comment.