mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-13 05:07:40 +02:00
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WFgFyiXdf8goqjeyckFLj8
78 lines
2.7 KiB
YAML
78 lines
2.7 KiB
YAML
name: Suites on every OS
|
|
|
|
# The three suites (backend pytest, frontend, electron) used to run only on one developer's Mac;
|
|
# CI ran a hermetic subset on Ubuntu. Users run a 2017 iMac, Intel Macs and Windows laptops, so the
|
|
# full suites run on the three hosted OSes. fail-fast is off and every suite runs even after a red
|
|
# one, so one run reports all nine verdicts.
|
|
#
|
|
# A private repo bills macOS minutes at ten times Linux; the two Mac legs ran 579 minutes in the
|
|
# fortnight before the move (5,790 billable against a 2,000-minute month), so a push runs the Windows
|
|
# leg, which no developer machine here can run, and a dispatch runs all three.
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [eric/dev, main]
|
|
|
|
concurrency:
|
|
group: suites-matrix-${{ github.ref }}
|
|
# A run in flight keeps its verdicts; a push mid-run queues behind it instead of cancelling the Mac legs.
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
suites:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: ${{ github.event_name == 'push' && fromJSON('["windows-latest"]') || fromJSON('["macos-latest", "macos-15-intel", "windows-latest"]') }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 60
|
|
env:
|
|
OSW_NEVER_KILL_ROUTER: '1'
|
|
OSW_DISABLE_AUTO_RESUME: '1'
|
|
OSW_NEVER_SPAWN_ROUTER: '1'
|
|
# The packaged app spawns its backend with PYTHONUTF8=1 (electron/main.js); the suite runs the way the product runs, or Windows' cp1252 default fails collection on the first source read.
|
|
PYTHONUTF8: '1'
|
|
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
cache: pip
|
|
cache-dependency-path: backend/requirements.lock
|
|
|
|
- name: Backend dependencies (the locked set users get, plus the test runner)
|
|
run: |
|
|
pip install -r backend/requirements.lock
|
|
pip install -r backend/requirements-dev.txt
|
|
|
|
- name: Backend suite
|
|
shell: bash
|
|
# A test that hangs fails by NAME after ten minutes and the leg goes on; without this the first macOS run sat at 97% for 54 minutes and was cancelled nameless.
|
|
run: python -m pytest backend/tests -q -p no:cacheprovider --timeout 600
|
|
|
|
- uses: actions/setup-node@v4
|
|
if: always()
|
|
with:
|
|
node-version: '22'
|
|
cache: npm
|
|
cache-dependency-path: |
|
|
frontend/package-lock.json
|
|
electron/package-lock.json
|
|
|
|
- name: Frontend suite
|
|
if: always()
|
|
shell: bash
|
|
working-directory: frontend
|
|
run: npm ci && npm test
|
|
|
|
- name: Electron suite
|
|
if: always()
|
|
shell: bash
|
|
working-directory: electron
|
|
run: npm ci && npm test
|