Fix CI: use uv for test venv, gate builds on tests, reduce build triggers
- test.yml: use uv venv instead of pip --break-system-packages - release.yml: inline test job that must pass before version bump; only triggers on source file changes (src/, src-tauri/, package.json) - sidecar-release.yml: inline Python test job that must pass before sidecar version bump - Both coordinators use `needs: test` so builds never start if tests fail Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ on:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
python-tests:
|
||||
@@ -13,12 +14,20 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install test dependencies
|
||||
- name: Install uv
|
||||
run: |
|
||||
pip install --break-system-packages pytest httpx pytest-asyncio anyio fastapi pydantic pyyaml uvicorn requests
|
||||
if command -v uv &> /dev/null; then
|
||||
echo "uv already installed: $(uv --version)"
|
||||
else
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
|
||||
- name: Run pytest
|
||||
run: python3 -m pytest backend/tests/ client/tests/ -v --tb=short
|
||||
run: |
|
||||
uv venv .testvenv
|
||||
VIRTUAL_ENV=.testvenv uv pip install pytest httpx pytest-asyncio anyio fastapi pydantic pyyaml uvicorn requests
|
||||
.testvenv/bin/python -m pytest backend/tests/ client/tests/ -v --tb=short
|
||||
|
||||
frontend-tests:
|
||||
name: Frontend Tests
|
||||
|
||||
Reference in New Issue
Block a user