Codebase list golang-github-moby-term / b4b2571
CI: remove "sudo" to fix incorrect Go versions (incorrect PATH, GOROOT) We were using `sudo` (without `-E`), causing environment variables that were set by `actions/setup-go` to be lost. We need to preserve environment variables, including `PATH`, because `actions/setup-go@v2` installs Go in specific paths to allow multiple versions to be installed/cached on workers, for example, in `"/opt/hostedtoolcache/go/1.13.15/x64"`. While it's possible to fix by adding both `-E`, and `env "PATH=$PATH"` (sudo -E does not preserve `PATH`as a security measure (see https://unix.stackexchange.com/a/83194/78656), this repository does not need `sudo` for its tests to run, so we might as well remove it altogether. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Sebastiaan van Stijn 3 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1414 - name: Checkout code
1515 uses: actions/checkout@v2
1616 - name: Test
17 run: sudo go test -v ./...
17 run: go test -v ./...
1818 lint:
1919 runs-on: ubuntu-latest
2020 steps: