Skip to content

Commit 31c58f1

Browse files
authored
Merge pull request #6725 from thaJeztah/test_denoise
gha: run unit-tests in go modules mode, to prevent traversing nested modules
2 parents 263562e + 14cffdb commit 31c58f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ jobs:
7171
-
7272
name: Test
7373
run: |
74-
go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/|/cmd/docker-trust')
74+
# run in go modules mode to prevent traversing to nested modules
75+
ln -s vendor.mod go.mod
76+
ln -s vendor.sum go.sum
77+
go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '^github.com/docker/cli/e2e/')
7578
go tool cover -func=/tmp/coverage.txt
7679
working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli
7780
shell: bash

0 commit comments

Comments
 (0)