From b5b40710038575989dad87cacb2d319821660439 Mon Sep 17 00:00:00 2001 From: bensynapse <118375461+bensynapse@users.noreply.github.com> Date: Tue, 17 Nov 2026 14:10:26 +0200 Subject: [PATCH] Run the plugin tests in CI on pushes to main and on pull requests The workflow fetches Agent Zero and the plugin index at the commits of the local source lock. --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ tests/README.md | 1 + 3 files changed, 52 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..4ef59fe --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: ci + +# Runs the checks of tests/README.md on every push to main and on pull requests. +# Actions are pinned by commit SHA, with the version in a comment. + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +# A new push to a pull request cancels the run it replaces. Every other run has a group of its own. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + +jobs: + test: + name: layout, index validator and browser tests + runs-on: ubuntu-latest + env: + # The commits of the local source lock (retrieved 2026-11-04). The tests compare against these trees. + AGENT_ZERO_COMMIT: ba9b67df0f54ac78106ae85c552ef5d2458f7c9a + A0_PLUGINS_COMMIT: c4d90b796e752252a1e36e3f4867add068e9d9e0 + PYTHONDONTWRITEBYTECODE: "1" + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: tests/requirements.txt + - name: Fetch Agent Zero and the plugin index at the locked commits + run: | + fetch() { + git init -q "$1" + git -C "$1" fetch -q --depth 1 "$2" "$3" + git -C "$1" -c advice.detachedHead=false checkout -q FETCH_HEAD + echo "$1 is at $(git -C "$1" rev-parse HEAD)" + } + fetch .coding-agent/upstream https://github.com/agent0ai/agent-zero.git "$AGENT_ZERO_COMMIT" + fetch .coding-agent/a0-plugins https://github.com/agent0ai/a0-plugins.git "$A0_PLUGINS_COMMIT" + mkdir -p .coding-agent/tmp + - run: pip install -r tests/requirements.txt + - run: python -m playwright install chromium + - run: python -m pytest -v -rP -p no:cacheprovider --basetemp=.coding-agent/tmp/pytest tests diff --git a/README.md b/README.md index 8b426b3..896bcb3 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@

+ CI MIT licence MCP, hosted and stdio

@@ -126,6 +127,7 @@ Revoke unused API keys through the dashboard. ## Validation and submission Run the checks described in [tests/README.md](tests/README.md). +The [ci workflow](.github/workflows/ci.yml) runs them on every push to main and on each pull request. The [submission notes](submissions/README.md) describe the public repository and index PR steps. Nothing has been published or submitted. diff --git a/tests/README.md b/tests/README.md index ee3e0ae..4a3d007 100644 --- a/tests/README.md +++ b/tests/README.md @@ -18,6 +18,7 @@ python3 -m venv .coding-agent/tmp/venv If the source checkouts are missing, clone these repositories into their matching paths. Check out the commits recorded in the source lock before comparing results. +The [ci workflow](../.github/workflows/ci.yml) fetches the same two commits. ```bash git clone --depth 1 https://github.com/agent0ai/agent-zero.git .coding-agent/upstream