diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85f0f007..0264d68e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,13 +31,10 @@ jobs: python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: - - name: Disable network connectivity + - name: Update network connectivity run: | - ip netns add jail - ip netns exec jail /bin/bash - ip addr add 127.0.0.1/8 dev lo - ip link set dev lo up - exit + sudo ethtool -K eth0 tx off rx off + install bwrap unshare - name: Checkout code uses: actions/checkout@v3 @@ -56,7 +53,7 @@ jobs: - name: Run tests run: | - ip netns exec jail su user -c 'python3 -m coverage run -m unittest' + bwrap --bind / / --dev /dev --unshare-net python3 -m coverage run -m unittest - name: Run linting run: pre-commit run --all-files