mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-04 18:28:06 +00:00
These were split out of #428/#429 because the token pushing them lacked the `workflow` scope. Folding them in here rather than opening a stacked PR -- #429 was merged into its stacked base after that base had already been squash-merged, so its content never reached main, and one such near-miss is enough. All three enrolled suites exist on this branch: test_version_consistency.py came with #428 and is on main; the other two arrive with the commits above. Enrolling them in a separate PR would have either raced with this one on test.yml or briefly pointed CI at files main did not have. - test.yml: enroll test_version_consistency, test_plugin_compatibility_gate and test_install_preserves_existing in the core unit job. Until now these 32 tests existed but nothing ran them automatically. - release-version-check.yml: run scripts/check_release_version.py on pushed v* tags and published releases, plus workflow_dispatch so a tag can be checked *before* it is created. No dependencies -- it reads src/__init__.py and CHANGELOG.md only. Verified: both workflow files parse, and the release check still passes for v3.2.0 against this tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Udr6MfaFLUPhX5Fgo67Jf5
83 lines
2.7 KiB
YAML
83 lines
2.7 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
# Both jobs only check out the repo and run pytest.
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
plugin-safety:
|
|
name: Plugin safety harness + unit tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
|
with:
|
|
python-version: "3.12"
|
|
cache: pip
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt -r requirements-test.txt
|
|
pip install RGBMatrixEmulator
|
|
|
|
- name: Run harness + visual rendering tests
|
|
run: |
|
|
pytest --no-cov \
|
|
test/plugins/test_harness.py \
|
|
test/plugins/test_visual_rendering.py \
|
|
test/plugins/test_plugin_matrix.py
|
|
|
|
unit-tests:
|
|
name: Core unit tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
|
with:
|
|
python-version: "3.12"
|
|
cache: pip
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt -r requirements-test.txt
|
|
pip install RGBMatrixEmulator
|
|
|
|
# Safety net for the shared sports/scroll/style infrastructure. These
|
|
# suites existed but were not enrolled in CI, so a refactor of
|
|
# src/base_classes or src/common could regress them silently. Enrolled
|
|
# explicitly (not `pytest test/`) so known hardware-only suites don't
|
|
# break CI; grow this list as more suites are made headless.
|
|
- name: Run core unit suites
|
|
run: |
|
|
pytest --no-cov \
|
|
test/test_skin_system.py \
|
|
test/test_font_manager.py \
|
|
test/test_data_sources.py \
|
|
test/test_api_extractors.py \
|
|
test/test_scroll_helper.py \
|
|
test/test_scroll_helper_continuous.py \
|
|
test/test_adaptive_layout.py \
|
|
test/test_loader_compat_warning.py \
|
|
test/test_sports_base_characterization.py \
|
|
test/test_element_style.py \
|
|
test/test_sports_core_promotions.py \
|
|
test/test_sports_modes_promotions.py \
|
|
test/test_sports_capabilities.py \
|
|
test/test_sports_scroll.py \
|
|
test/test_version_consistency.py \
|
|
test/test_plugin_compatibility_gate.py \
|
|
test/test_install_preserves_existing.py
|