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:
@@ -12,8 +12,27 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run Tests
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Python tests
|
||||
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
|
||||
|
||||
bump-sidecar-version:
|
||||
name: Bump sidecar version and tag
|
||||
needs: test
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
@@ -61,7 +80,6 @@ jobs:
|
||||
NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}"
|
||||
echo "New sidecar version: ${NEW_VERSION}"
|
||||
|
||||
# Only update pyproject.toml -- version.py is owned by the app release workflow
|
||||
sed -i "s/^version = \"${CURRENT}\"/version = \"${NEW_VERSION}\"/" pyproject.toml
|
||||
|
||||
echo "version=${NEW_VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
Reference in New Issue
Block a user