From 966855469de2434246b8aebee893c9b0f8edb363 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 4 Jun 2026 23:36:33 +0800 Subject: [PATCH] ci: run the full test suite on pull requests The repo had no PR test gate, so broken tests landed on dev unnoticed. Add a pull_request workflow that runs `pnpm -r --no-bail --if-present test` across all packages on ubuntu-latest (pnpm 10.28.0, Node 22), with per-PR concurrency. --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 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 00000000..2dc526e5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +# Run the full workspace test suite on every pull request. +# +# The repo previously had no PR test gate, so broken tests could land on `dev` +# unnoticed — and did (protocol's oidb-service rejection path, plus an external +# contributor PR). This gates every PR on the whole suite. +# +# `pnpm -r --no-bail --if-present test` runs each package's `test` script +# (skipping packages without one); --no-bail means one failing package still +# reports the rest, and the run as a whole still fails if any package fails. +name: CI + +on: + pull_request: + +permissions: + contents: read + +# Cancel an in-flight run when the PR gets new commits. +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: pnpm/action-setup@v6 + with: + version: 10.28.0 + run_install: false + + - uses: actions/setup-node@v6 + with: + node-version: '22' + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run all package tests + run: pnpm -r --no-bail --if-present test