llamacppctl/.forgejo/workflows/ci.yml
dschlueter 55af8d8fb3 test: cover build_archive and add it to the ruff scope
build_archive.py had no lint or test coverage, which is how the obsolete
requirements/pyproject mirror check slipped through unnoticed. Close that gap:

- Add tests/test_build_archive.py: a network-free smoke test that runs the
  manifest check, dependency parsing, tarball build, and re-verification, and
  asserts the moved docs/ files, LICENSE, and package sources are packaged.
- Lint build_archive.py in both the local gate (scripts/check.sh) and the CI
  workflow; fix the one issue this surfaced (unused variable py_bin).
- List the new test in the REQUIRED_FILES manifest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 11:20:57 +02:00

47 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package with dev extras
run: pip install -e ".[dev]"
- name: Ruff (lint)
run: ruff check src/ tests/ build_archive.py
- name: Mypy (type check)
run: mypy
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# requires-python = ">=3.10"; test the floor and a recent version.
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package with dev extras
run: pip install -e ".[dev]"
- name: Run test suite
# `python -m pytest` puts the repo root on sys.path so the test modules
# can `import tests.*` (the pytest console script would not).
run: python -m pytest -q