From ae9b82d33480b269308d7e711c38f28257bd1fbb Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Thu, 18 Jun 2026 10:51:12 -0600 Subject: [PATCH] ci: run Next.js adapter integration suite against harper PRs Closes the regression loop from the nextjs side: when a harper PR touches the HTTP/cache/resource/server paths, call HarperFast/nextjs's reusable integration workflow with harper_ref = this PR's head SHA, so the adapter's Playwright suite runs against the in-PR harper build. Depends on HarperFast/nextjs#49 (the workflow_call + harper_ref input). Pin the @main ref to the #49 merge SHA before merging. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../workflows/integration-tests-nextjs.yml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/integration-tests-nextjs.yml diff --git a/.github/workflows/integration-tests-nextjs.yml b/.github/workflows/integration-tests-nextjs.yml new file mode 100644 index 0000000000..96f35b91aa --- /dev/null +++ b/.github/workflows/integration-tests-nextjs.yml @@ -0,0 +1,39 @@ +name: Next.js Integration Tests (downstream) + +# Runs the @harperfast/nextjs adapter's Playwright integration suite against THIS +# PR's harper build, so a harper change that breaks the Next.js framework-hosting +# integration (HTTP server, REST, ISR/`use cache` backed by Harper tables) is +# caught here rather than in the downstream adapter repo. +# +# It calls the reusable workflow in HarperFast/nextjs, passing this PR's head SHA +# as `harper_ref`; the reusable workflow checks out + builds harper at that ref and +# resolves it as the `harper` the test harness and fixtures run against. +# +# Scoped to PRs that touch the HTTP / cache / resource / server code paths the +# adapter exercises (tune the paths filter as coverage evolves). +# +# ── BEFORE MERGE ─────────────────────────────────────────────────────────────── +# 1. Depends on HarperFast/nextjs#49 — the `workflow_call` + `harper_ref` input +# must be on nextjs `main` first, or this caller has nothing to call. +# 2. Replace the mutable `@main` ref below with the 40-char merge-commit SHA of +# nextjs#49 (cross-repo reusable `uses:` should pin to a SHA, matching the +# convention in validate-caller-workflows.yml). + +on: + pull_request: + paths: + - 'cache/**' + - 'resources/**' + - 'server/**' + - 'dataLayer/**' + - 'components/**' + - 'config/**' + - 'package.json' + - 'package-lock.json' + +jobs: + nextjs-integration: + name: Next.js adapter integration (against this PR's harper) + uses: HarperFast/nextjs/.github/workflows/integration-tests.yml@main # TODO: pin to nextjs#49 merge SHA before merging + with: + harper_ref: ${{ github.event.pull_request.head.sha }}