diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..88ce052 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + # Cancel superseded PR runs, but let every commit on main finish. + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + + # Python comes from .python-version (3.10, the lowest supported version). + - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 + with: + enable-cache: true + + - name: Install workspace + run: uv sync --locked --all-packages + + # Tests marked e2e need a real backend; never run them here. + - name: Test packages + run: uv run --no-sync pytest libs -q -m "not e2e" + + # agent-harness is not a workspace member; its tests import from its own + # directory. + - name: Test agent-harness + env: + PYTHONPATH: agent-harness + run: uv run --no-sync pytest agent-harness -q