From 6079d2730f859dab09cd15c0413d95bf37c3b985 Mon Sep 17 00:00:00 2001 From: Bossiara13 <236771060+DmitryBykov-ISPO@users.noreply.github.com> Date: Sat, 16 May 2026 13:38:22 +0300 Subject: [PATCH] chore: GitHub Actions CI workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b258562 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +# 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