-
-
Notifications
You must be signed in to change notification settings - Fork 258
63 lines (53 loc) · 2.07 KB
/
Copy pathmain.yml
File metadata and controls
63 lines (53 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Python CI
on:
pull_request:
branches:
- '**'
jobs:
run-ci:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Sibling packages are installed explicitly so the
# cross-package seam tests (tests/test_import_integrity.py and
# the cmd_serve contract in tests/test_cli_smoke.py) run
# instead of skipping. Issue #999 shipped because the
# openadapt-ml seam was never tested in CI; the lazy
# __getattr__ in openadapt/__init__.py imports from all of
# these.
pip install -e ".[dev]" openadapt-ml openadapt-capture \
openadapt-evals openadapt-viewer openadapt-grounding \
openadapt-retrieval
- name: Lint with ruff
run: |
ruff check openadapt/
ruff format --check openadapt/
- name: Verify package imports
run: |
python -c "from openadapt.cli import main; print('CLI import OK')"
python -c "from openadapt.version import __version__; print(f'Version: {__version__}')"
- name: Run tests
run: pytest tests/ -v
- name: Build release artifacts and reject workstation state
run: |
python -m build
python scripts/verify_release_artifacts.py
tar -tzf dist/*.tar.gz > /tmp/openadapt-sdist-files.txt
! grep -E '/(\.env|\.cache/|[^/]+\.db$|output\.png$|\.claude/|\.worktrees/)' /tmp/openadapt-sdist-files.txt
unzip -l dist/*.whl > /tmp/openadapt-wheel-files.txt
! grep -E '(\.env|\.cache/|[^/]+\.db$|output\.png$|\.claude/|\.worktrees/)' /tmp/openadapt-wheel-files.txt