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