Skip to content

CI: use --no-sources for standalone uv sync #5

CI: use --no-sources for standalone uv sync

CI: use --no-sources for standalone uv sync #5

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
# Standalone CI has no workspace context. Skip [tool.uv.sources]
# workspace overrides and use the git URLs in dependencies instead.
UV_NO_SOURCES: "true"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Ruff lint
run: uv run ruff check .
- name: Ruff format check
run: uv run ruff format --check .
- name: Pytest
run: |
if [ -d tests ]; then
uv run pytest tests/ -v
else
echo "No tests/ directory; skipping pytest."
fi
notify-robot-code:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Dispatch integration run
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ROBOT_CODE_DISPATCH_TOKEN }}
repository: personalrobotics/robot-code
event-type: sibling-updated
client-payload: '{"repo":"${{ github.event.repository.name }}","sha":"${{ github.sha }}"}'