From bac4f3f7bfd45d72b75a4395984ab2cdb1d46c32 Mon Sep 17 00:00:00 2001 From: sai-bot Date: Sun, 29 Nov 2026 23:55:02 -0800 Subject: [PATCH 1/2] ci: run package and agent-harness tests on pull requests The repository had no workflow, so pull requests were only checked by CodeQL. Run the same commands contributors run locally, on Python 3.10 from a locked install. --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d69704f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + + # Python comes from .python-version (3.10, the lowest supported version). + - uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + + - name: Install workspace + run: uv sync --locked + + # Real-backend tests (marked e2e) skip themselves without their env vars. + - name: Test packages + run: uv run pytest libs -q + + # 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 pytest agent-harness -q From 56b0afcf5981314f01f29224c0988c86295af290 Mon Sep 17 00:00:00 2001 From: sai-bot Date: Mon, 30 Nov 2026 01:12:18 -0800 Subject: [PATCH 2/2] ci: harden workflow after review - Let runs on main finish; only superseded PR runs are cancelled. - Deselect e2e-marked tests explicitly instead of relying on each one skipping itself. - Install every workspace member and run tests without re-syncing. - Pin actions to commit SHAs and do not persist the checkout token. --- .github/workflows/ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d69704f..88ce052 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,30 +10,33 @@ permissions: concurrency: group: ci-${{ github.ref }} - cancel-in-progress: true + # 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@v4 + - 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@v6 + - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 with: enable-cache: true - name: Install workspace - run: uv sync --locked + run: uv sync --locked --all-packages - # Real-backend tests (marked e2e) skip themselves without their env vars. + # Tests marked e2e need a real backend; never run them here. - name: Test packages - run: uv run pytest libs -q + 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 pytest agent-harness -q + run: uv run --no-sync pytest agent-harness -q