ci: establish green validation baseline (#59)

This commit is contained in:
Joseph Magly
2026-08-14 09:55:49 -04:00
parent 2295ef3571
commit 548092d5ca
61 changed files with 5464 additions and 78 deletions
+21
View File
@@ -0,0 +1,21 @@
## Summary
- TBD
## Tests
- [ ] `python -m ruff check --select F obliteratus tests scripts/gemma4_12b_recursive_loop.py`
- [ ] `python -m ruff check --select E501 --statistics obliteratus tests scripts/gemma4_12b_recursive_loop.py` reviewed as known non-blocking line-length debt
- [ ] `python -c 'import obliteratus; print(getattr(obliteratus, "__version__", "import ok"))'`
- [ ] `python -m obliteratus --help`
- [ ] `python -m pytest`
- [ ] `python -m build --sdist --wheel`
## Checklist
- [ ] Relevant tests were added or updated for new behavior.
- [ ] The full test suite passes locally or the CI result is linked.
- [ ] Documentation or examples were updated when user-facing behavior changed.
- [ ] No secrets, credentials, generated provider files, or unrelated changes are included.
Legacy cleanup PRs may receive missing tests as a one-time maintainer courtesy when the change is already otherwise clean. New changes are expected to include relevant tests and keep the full suite passing.
+121
View File
@@ -0,0 +1,121 @@
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_NO_INPUT: "1"
jobs:
package:
name: Package
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
pyproject.toml
requirements*.txt
- name: Install build tooling
run: python -m pip install "build==1.2.2.post1"
- name: Build source and wheel distributions
run: python -m build --sdist --wheel
lint:
name: Ruff
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Ruff
run: python -m pip install "ruff==0.8.6"
- name: Enforce Ruff F gate
run: python -m ruff check --select F obliteratus tests scripts/gemma4_12b_recursive_loop.py
- name: Report E501 legacy baseline
if: always()
run: python -m ruff check --select E501 --statistics obliteratus tests scripts/gemma4_12b_recursive_loop.py || true
test:
name: Tests py${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
pyproject.toml
requirements*.txt
- name: Install CPU PyTorch
run: python -m pip install --index-url https://download.pytorch.org/whl/cpu "torch>=2.0"
- name: Install package and test tools
run: |
python - <<'PY' > /tmp/torch-cpu-constraint.txt
import torch
print(f"torch=={torch.__version__}")
PY
python -m pip install -e ".[dev]" -c /tmp/torch-cpu-constraint.txt
- name: Smoke import and CLI
run: |
python - <<'PY'
import obliteratus
version = getattr(obliteratus, "__version__", None)
if version is not None:
print(f"obliteratus version: {version}")
else:
print("obliteratus import: ok")
PY
python -m obliteratus --help
- name: Run tests with coverage
run: python -m pytest