68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: Python ${{ matrix.python-version }} test suite
|
|
runs-on: ${{ github.repository_owner == 'openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }}
|
|
timeout-minutes: 15
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.11", "3.12"]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
|
|
- name: Install project
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -e .[dev]
|
|
|
|
- name: Run static lint
|
|
run: python -m ruff check clawbench app.py scripts tests
|
|
|
|
- name: Run runtime contract smoke tests
|
|
run: python -m pytest -q tests/test_runtime_contracts.py
|
|
|
|
- name: Run test suite
|
|
run: python -m pytest -q
|
|
|
|
- name: Verify wheel contains runtime data
|
|
run: |
|
|
python -m pip wheel --no-deps . -w /tmp/clawbench-wheel
|
|
python - <<'PY'
|
|
from pathlib import Path
|
|
import zipfile
|
|
|
|
wheel = next(Path("/tmp/clawbench-wheel").glob("clawbench-*.whl"))
|
|
with zipfile.ZipFile(wheel) as archive:
|
|
names = set(archive.namelist())
|
|
required = [
|
|
"tasks-public/MANIFEST.yaml",
|
|
"tasks-domain/MANIFEST.yaml",
|
|
"profiles/example_research_stack.yaml",
|
|
"baselines/BASELINE_SOURCES.md",
|
|
]
|
|
missing = [name for name in required if name not in names]
|
|
if missing:
|
|
raise SystemExit(f"wheel missing runtime files: {missing}")
|
|
PY
|