Skip to content

DEBUG: CI

DEBUG: CI #233

name: integration testsuite
on: [push, pull_request]
jobs:
test:
env:
apt-dependencies: |
autoconf automake ebtables intltool ipset iptables libdbus-1-dev \
libgirepository1.0-dev libglib2.0-dev libxml2-utils network-manager \
pkg-config policykit-1 gir1.2-nm-1.0 libnm0 docker.io
pip-dependencies: |
dbus-python PyGObject
name: >-
python-${{ matrix.python-version }}
nftables-${{ matrix.nftables-version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.8]
libnftnl-version: [libnftnl-1.2.5]
nftables-version: [v1.0.7]
steps:
- name: checkout
uses: actions/checkout@v4
- name: apt update
run: sudo apt update
- name: apt install dependencies
run: sudo apt install -y ${{ env.apt-dependencies }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: pip install dependencies
run: |
python -m pip install --upgrade pip
pip install ${{ env.pip-dependencies }}
- name: install nftables build dependencies
run: |
sudo apt install -y libmnl-dev libgmp-dev libreadline-dev \
libjansson-dev libedit-dev
- name: install libnftnl ${{ matrix.libnftnl-version }}
run: |
cd /tmp
git clone --depth=1 --branch ${{ matrix.libnftnl-version }} git://git.netfilter.org/libnftnl
cd libnftnl
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
- name: install nftables ${{ matrix.nftables-version }}
run: |
cd /tmp
git clone --depth=1 --branch ${{ matrix.nftables-version }} git://git.netfilter.org/nftables
cd nftables
./autogen.sh
./configure --disable-man-doc --with-json --disable-python
make
sudo make install
cd py
pip install .
sudo ldconfig
- name: build firewalld
run: |
./autogen.sh
./configure --disable-docs ${{ matrix.configure_args }}
make -j $(nproc)
- name: stop NetworkManager
run: |
sudo systemctl stop NetworkManager
- name: copy dbus/polkit config to /
run: |
install -m 0644 config/FirewallD.conf /usr/share/dbus-1/system.d/FirewallD.conf
install -m 0644 config/org.fedoraproject.FirewallD1.server.policy /usr/share/polkit-1/actions/org.fedoraproject.FirewallD1.server.policy.choice
install -m 0644 config/org.fedoraproject.FirewallD1.desktop.policy /usr/share/polkit-1/actions/org.fedoraproject.FirewallD1.desktop.policy.choice
ln -s /usr/share/polkit-1/actions/org.fedoraproject.FirewallD1.server.policy.choice /usr/share/polkit-1/actions/org.fedoraproject.FirewallD1.policy
- name: SIGHUP dbus
run: |
sudo pkill -HUP dbus-daemon
- name: restart polkit
run: |
sudo systemctl restart polkit
- name: start docker
run: |
sudo systemctl start docker
- name: run integration testsuite
run: |
sudo make -C src/tests check-integration \
|| sudo make -C src/tests check-integration TESTSUITEFLAGS="--recheck --errexit --verbose"