Skip to content

Commit 724a6da

Browse files
authored
Merge pull request #56 from fmount/gowork
Add GOWORK variable to the CI scripts
2 parents 9471567 + 022d0ee commit 724a6da

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

test-runner/gofmt.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -ex
33

4+
GOWORK=${GOWORK:-'off'}
45
BASE_DIR="$(dirname $0)"
56
cd "${BASE_DIR}/../.."
67

@@ -10,5 +11,5 @@ if [ -n "$1" ]; then
1011
fi
1112

1213
pushd ${MODULE_DIR}
13-
go fmt ./...
14+
GOWORK=$GOWORK go fmt ./...
1415
popd

test-runner/golangci.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -ex
33

4+
GOWORK=${GOWORK:-'off'}
45
BASE_DIR="$(dirname $0)"
56
cd "${BASE_DIR}/../.."
67

@@ -21,5 +22,5 @@ fi
2122

2223
pushd ${MODULE_DIR}
2324

24-
GOGC=10 GOLANGCI_LINT_CACHE=/tmp/golangci-cache ${BASE_DIR}/../../bin/golangci-lint run --timeout=${TIMEOUT}m -v
25+
GOWORK=$GOWORK GOGC=10 GOLANGCI_LINT_CACHE=/tmp/golangci-cache ${BASE_DIR}/../../bin/golangci-lint run --timeout=${TIMEOUT}m -v
2526
popd

test-runner/golint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -ex
55
# "-set_exit_status" otherwise
66
LINT_EXIT_STATUS="-set_exit_status"
77

8+
GOWORK=${GOWORK:-'off'}
89
BASE_DIR="$(dirname $0)"
910
cd "${BASE_DIR}/../.."
1011

@@ -25,5 +26,5 @@ fi
2526
pushd ${MODULE_DIR}
2627
export GOFLAGS="-mod=mod"
2728

28-
golint ${LINT_EXIT_STATUS} ./...
29+
GOWORK=$GOWORK golint ${LINT_EXIT_STATUS} ./...
2930
popd

test-runner/gotest.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -ex
33

4+
GOWORK=${GOWORK:-'off'}
45
BASE_DIR="$(dirname $0)"
56
cd "${BASE_DIR}/../.."
67

@@ -10,5 +11,5 @@ if [ -n "$1" ]; then
1011
fi
1112

1213
pushd ${MODULE_DIR}
13-
go test -mod=mod -v ./...
14+
GOWORK=$GOWORK go test -mod=mod -v ./...
1415
popd

test-runner/govet.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -ex
33

4+
GOWORK=${GOWORK:-'off'}
45
BASE_DIR="$(dirname $0)"
56
cd "${BASE_DIR}/../.."
67

@@ -10,5 +11,5 @@ if [ -n "$1" ]; then
1011
fi
1112

1213
pushd ${MODULE_DIR}
13-
go vet -mod=mod ./...
14+
GOWORK=$GOWORK go vet -mod=mod ./...
1415
popd

0 commit comments

Comments
 (0)