Skip to content

Commit 52d686d

Browse files
committed
ci/gha: use go test -exec sudo
Running "sudo go test" results in a different environment, so go has to recompile everything again. Use "go test -exec sudo" so test would compile as current user (so that go build cache is reused), then run as root. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 81f3396 commit 52d686d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
shell: bash
2424

2525
- name: Test
26-
run: sudo -E env PATH=$PATH go test -v ./ ./nl
26+
run: go test -exec sudo -v ./ ./nl
2727

2828
build-macos:
2929
# netlink is Linux-only, but this ensures that netlink builds without error

0 commit comments

Comments
 (0)