Skip to content

Merge pull request #2 from andylemin/restructure #6

Merge pull request #2 from andylemin/restructure

Merge pull request #2 from andylemin/restructure #6

Workflow file for this run

name: tests
on:
push:
pull_request:
jobs:
python:
# Host-independent suites: protocol, client and server. The PF ioctl and
# live-firewall suites skip here by design and need an OpenBSD host.
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pytest
python -m pip install -r server-python/requirements.txt
python -m pip install -r client-unbound/requirements.txt
- name: Run tests
run: python -m pytest -v
- name: Check both daemons parse
run: python -m py_compile server-python/pfui_firewall.py client-unbound/pfui_unbound.py
server-c:
# Builds the C framing implementation and runs the same conformance vectors
# as the Python one, so the two cannot drift apart unnoticed.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and run protocol vectors
run: make -C server-c test
shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Syntax-check the installers and ops scripts
run: |
for f in *.sh client-unbound/tools/*.sh; do bash -n "$f"; done
- name: Syntax-check the rc.d scripts
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq ksh
for f in client-unbound/rc.d/* server-python/rc.d/*; do ksh -n "$f"; done