ac082e1932
The editor's packages join the dev group so the main job no longer skips test_editor.py, and a separate job runs it with SCA_EDITOR_E2E=1 to boot a real marimo kernel. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
83 lines
2.0 KiB
YAML
83 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- dev
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- dev
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: Python ${{ matrix.python-version }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version:
|
|
- "3.10"
|
|
- "3.11"
|
|
- "3.12"
|
|
- "3.13"
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
|
|
- name: Install uv and Python
|
|
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
enable-cache: true
|
|
cache-python: true
|
|
|
|
- name: Install locked dependencies
|
|
run: uv sync --locked --group dev
|
|
- name: Verify headless rendering support
|
|
run: command -v xvfb-run
|
|
|
|
|
|
- name: Compile package
|
|
run: uv run python -m compileall -q src/simplecadapi
|
|
|
|
- name: Run tests
|
|
run: xvfb-run --auto-servernum uv run pytest test tests -q
|
|
|
|
editor-e2e:
|
|
# The editor tests that boot a real marimo kernel (about a minute); the main
|
|
# job runs the rest of test/test_editor.py without it.
|
|
name: Editor end to end
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
env:
|
|
SCA_EDITOR_E2E: "1"
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
|
|
- name: Install uv and Python
|
|
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
with:
|
|
python-version: "3.12"
|
|
enable-cache: true
|
|
cache-python: true
|
|
|
|
- name: Install locked dependencies
|
|
run: uv sync --locked --group dev
|
|
|
|
- name: Run the editor tests, kernel included
|
|
run: uv run pytest test/test_editor.py -q
|