Skip to content

ci: implement nightly container-based test runs and fast local tox-based testing #1060

@markuslf

Description

@markuslf

Goal

Split the test strategy into tiers to speed up the development workflow while maintaining real cross-platform coverage.

Tier 1: Fast local / CI tests (tox + multiple Python versions)

  • Run unit tests with test data (no containers, no external services) via tox
  • Cover Python 3.9 (RHEL 8) through 3.14 (current)
  • Runs in seconds, suitable for every commit and local development
  • Should work for all plugins that have a unit-test/run with --test data

Tier 2: Nightly container-based tests (podman, GitHub Actions)

Scheduled GitHub Actions workflow (cron, e.g. daily at 02:00 UTC). Failures are reported as notifications the next morning, not blocking PRs.

Approach:

  1. Build cacheable base images per distro with Python and all dependencies (psutil, pymysql, etc.). These are built once and cached, not rebuilt every night.

  2. Run ALL --test-based unit tests inside every distro container. Copy the plugin + lib into the container, run python3 plugin --test=.... This is fast (milliseconds per check, no external services needed) and tests real platform behavior - different Python versions, different psutil versions, different system libraries. This is NOT the same as just testing the lib.

  3. Run plugin-specific container tests (with services) where they exist. Plugins with unit-test/containerfiles/ that start MySQL, Redis etc. run their full integration tests.

Run containers in parallel (GitHub Actions matrix) to keep total wall-clock time manageable.

Target Linux platforms (via podman, official container images)

  • Arch Linux
  • Debian 11, 12, 13
  • Fedora (current)
  • openSUSE Leap / Tumbleweed
  • Photon OS (VMware, official Docker image)
  • RHEL 8, 9, 10 (via UBI)
  • Ubuntu 20.04, 22.04, 24.04, 26.04 (when released)

Windows

Windows is not part of the nightly tests. Plugins with a .windows file must be compiled (PyInstaller/Nuitka) before testing, and the build requires manual confirmation due to code signing. Windows testing belongs in the release/build process, not in a nightly cron job.

Not planned

  • Distributions older than RHEL 8 (Python < 3.9, all EOL)
  • Slackware (no official container images)
  • SLES (requires subscription for images)
  • ARM/Raspberry Pi (lower priority, can be added later via QEMU emulation or dedicated ARM runners)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci/cdContinuous integration, workflows, release automation, test automation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions