Skip to content

Commit d070f46

Browse files
test(ci): run tests with sudo for ICMP socket permissions
Raw ICMP sockets require CAP_NET_RAW capability or root privileges. GitHub Actions runners don't have this by default, so run tests with sudo. The -E flag preserves environment variables (CARGO_HOME, etc.) and $(which cargo) ensures the correct binary is found.
1 parent 73d3be8 commit d070f46

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ jobs:
6161
with:
6262
toolchain: ${{ matrix.rust }}
6363

64-
- run: cargo test
64+
- name: Run tests
65+
run: sudo -E $(which cargo) test

0 commit comments

Comments
 (0)