diff --git a/.github/AGENTS.md b/.github/AGENTS.md index 368fc78..1d0ffbb 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -41,9 +41,11 @@ exceptions; it does not define the source test suite or imply that every package - Validate YAML and every affected expression/shell. Trace each changed matrix row through dependency installation, source/native import checks, Nuitka/installer output, packaged architecture/dependency checks, artifact upload, and tag gates. When a target cannot run locally, add a narrow CI assertion that fails before publication with a useful reason. -- The current workflow performs packaging/import/native checks but does not run the unittest behavioral suite. Do - not call an artifact build a regression-test pass; use `tests/README.md` for source verification. Check actual - `needs` and tag gates rather than assuming a downstream publish job runs on every build. Follow each publication +- `workflows/source-tests.yml` runs isolated source unittest discovery on Windows, Linux, and macOS and is a + required dependency of PyPI publication through `deploy-pypi.yml`. It can also run manually. Daily binary + builds retain their separate artifact scope. Source tests do not establish packaged behavior or Python/Qt + floors beyond their matrix. Do not call an artifact build a regression-test pass; use `tests/README.md` for + source verification. Check actual `needs` and tag gates rather than assuming a downstream publish job runs on every build. Follow each publication dependency back to its required artifact checks; upload success alone does not establish release eligibility. - Revalidate version/architecture claims against the current matrix instead of duplicating all pins here. When build topology intentionally changes, update this scope and follow every consumer through upload and publication. diff --git a/.github/workflows/deploy-pypi.yml b/.github/workflows/deploy-pypi.yml index 782cee1..3235413 100644 --- a/.github/workflows/deploy-pypi.yml +++ b/.github/workflows/deploy-pypi.yml @@ -24,6 +24,10 @@ defaults: shell: bash jobs: + source-tests: + name: Source regression tests + uses: ./.github/workflows/source-tests.yml + build-distribution: name: Build distribution runs-on: ubuntu-latest @@ -60,6 +64,7 @@ jobs: name: Publish Python distribution to PyPI if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: + - source-tests - build-distribution - deploy-binaries runs-on: ubuntu-latest diff --git a/.github/workflows/source-tests.yml b/.github/workflows/source-tests.yml new file mode 100644 index 0000000..1779466 --- /dev/null +++ b/.github/workflows/source-tests.yml @@ -0,0 +1,33 @@ +name: Source regression tests + +on: + workflow_call: + workflow_dispatch: + +permissions: + contents: read + +jobs: + unittest: + name: Source tests on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, windows-2025, macos-14] + env: + QT_QPA_PLATFORM: offscreen + PYTHONUTF8: "1" + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 + with: + python-version: "3.13" + - name: Install Linux Qt runtime libraries + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0 + - name: Install source test dependencies + run: python -m pip install -r requirements.txt "PySide6-Essentials==6.8.3" "PySide6-Addons==6.8.3" + - name: Run isolated behavioral and resource tests + run: python -m unittest discover -s tests -v diff --git a/tests/README.md b/tests/README.md index b09ff9c..e037b25 100644 --- a/tests/README.md +++ b/tests/README.md @@ -231,3 +231,8 @@ original stored bytes after malformed records or plugin parsing failures. launch preparation fails before a service acquires the runtime. `test_subscription_manager.py` exercises Stop Updates with a real button click, partial batch success, stale-result rejection, unchanged automatic schedules, and restart. + +The reusable `source-tests.yml` workflow runs full unittest discovery on Windows, +Linux, and macOS with Python 3.13 and PySide6 6.8.3. The publication workflow requires +that job before PyPI publication. Opt-in tests and packaged/manual smoke checks remain +separate; local Windows results do not establish the other CI targets.