Fix: remove nothing changes in network.py #1655
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pytest | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install apt package | |
| run: | | |
| sudo apt-get update \ | |
| && sudo apt-get install -y --no-install-recommends \ | |
| ifupdown \ | |
| iproute2 \ | |
| iptables \ | |
| traceroute \ | |
| curl \ | |
| dnsutils \ | |
| netcat-openbsd \ | |
| openssh-client \ | |
| iputils-ping \ | |
| mininet \ | |
| net-tools \ | |
| bridge-utils \ | |
| tcpdump \ | |
| gcc \ | |
| make \ | |
| libpcap-dev \ | |
| libbsd-dev \ | |
| dnsmasq \ | |
| isc-dhcp-client \ | |
| openvswitch-switch \ | |
| git | |
| sudo touch /etc/network/interfaces | |
| sudo mkdir -p /opt/mininet_dependencies | |
| - name: Build mimidump | |
| run: | | |
| git clone https://github.com/mimi-net/mimidump.git | |
| cd mimidump && sudo make prefix=/usr install | |
| - name: Disable packet transmission to filters | |
| run: | | |
| sudo modprobe br_netfilter | |
| sudo sysctl -w net.bridge.bridge-nf-call-iptables=0 | |
| sudo sysctl -w net.bridge.bridge-nf-call-arptables=0 | |
| sudo sysctl -w net.bridge.bridge-nf-call-ip6tables=0 | |
| sudo sysctl -p | |
| - name: Run Open VSwitch | |
| run: | | |
| sudo /usr/share/openvswitch/scripts/ovs-ctl start | |
| sudo ovs-vswitchd & | |
| - name: Set up virtualenv | |
| run: | | |
| python -m venv venv | |
| source venv/bin/activate | |
| python -m pip install pip wheel pytest | |
| pip install -r back/requirements.txt | |
| - name: Test with pytest | |
| run: | | |
| sudo bash -c ' | |
| source venv/bin/activate | |
| cd back/tests | |
| export PYTHONPATH=$PYTHONPATH:../src | |
| pytest . | |
| ' |