Two parallel jobs: - test: pytest on Windows + Linux matrix. Installs the minimal deps the tests actually exercise (pyyaml + openai + flet). Heavy STT/TTS/Vosk packages are runtime concerns, tests don't touch them. - lint: ruff on Linux, lenient ruleset — catches real errors (E, F, W) without enforcing stylistic preferences the codebase wasn't written with ruff in mind for. Non-blocking (|| true) so style nits don't break CI. Triggers on push to feature/pc-tools/master/main and PRs to master/main.
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
# CI for J.A.R.V.I.S. Python fork.
|
|
#
|
|
# Two jobs in parallel:
|
|
# - test: pytest on the in-repo test suite. Only installs the minimal
|
|
# dependencies the tests actually touch (yaml, openai for
|
|
# llm_backend, flet for the GUI smoke tests). Heavy STT / TTS / Vosk
|
|
# packages aren't needed in CI — they're runtime concerns, and the
|
|
# tests are written to not touch them.
|
|
# - lint: ruff against the project. Style problems should be caught here
|
|
# before they land in master.
|
|
#
|
|
# Cross-platform: tests run on both Windows and Linux runners to catch path
|
|
# / line-ending / fs-case issues early.
|
|
|
|
name: Python CI
|
|
|
|
on:
|
|
push:
|
|
branches: [feature/pc-tools, master, main]
|
|
pull_request:
|
|
branches: [master, main]
|
|
|
|
jobs:
|
|
test:
|
|
name: pytest (${{ matrix.os }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
- name: Install test deps
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pytest pyyaml openai flet
|
|
- name: Run tests
|
|
run: pytest tests/ -v --tb=short
|
|
|
|
lint:
|
|
name: ruff
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
- name: Install ruff
|
|
run: pip install ruff
|
|
- name: Lint
|
|
# Drop the strictest rules — the codebase wasn't written with ruff in
|
|
# mind and we don't want CI to fail on stylistic preferences.
|
|
run: ruff check --select=E,F,W --ignore=E501,F401,E402,W291,W293,W391 . || true
|