Skip to content

Add E2E testing infrastructure using mkosi #12

Add E2E testing infrastructure using mkosi

Add E2E testing infrastructure using mkosi #12

Workflow file for this run

name: E2E Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
e2e-tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12', '3.13', '3.14', '3.14t']
env:
PYTHON_VERSION: ${{ matrix.python-version }}
UNIT_NAME: pystemd-e2e-py${{ matrix.python-version }}.service
MACHINE_NAME: pystemd-test-py${{ matrix.python-version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
# - name: Set up latest Python
# uses: actions/setup-python@v4
- name: setup-mkosi
uses: systemd/mkosi@v26
- name: Install systemd-container
run: |
sudo apt-get update
sudo apt-get install -y systemd-container
- name: Generate mkosi keys
run: |
sudo mkosi genkey
- name: Build mkosi test image
run: |
sudo mkosi -E "$PYTHON_VERSION" build
- name: run e2e pytest
run: |
sudo apt-get update
sudo apt-get install -y libsystemd-dev
uv sync --all-extras
sudo uv run pytest e2e