Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "vercel/workflow" }
],
"changelog": ["@changesets/changelog-github", { "repo": "vercel/workflow" }],
"commit": false,
"fixed": [],
"linked": [],
Expand All @@ -14,6 +11,7 @@
"docs",
"nextjs-turbopack",
"nextjs-webpack",
"@workflow/example-nextjs-pages-router",
"@workflow/example-app",
"@workflow/example-hono",
"@workflow/example-express",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/every-ants-bet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@workflow/next": patch
---

Add Pages Router support for Next.js integration. The integration now auto-detects which router(s) the project uses and generates appropriate workflow routes for both App Router and Pages Router.
3 changes: 2 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"@workflow/rollup": "4.0.0-beta.1",
"@workflow/astro": "4.0.0-beta.1",
"@workflow/example-fastify": "0.0.0",
"@workflow/vite": "4.0.0-beta.1"
"@workflow/vite": "4.0.0-beta.1",
"@workflow/example-nextjs-pages-router": "0.0.0"
},
"changesets": [
"add-documentation",
Expand Down
47 changes: 29 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '<!-- e2e-test-results -->'
comment-author: "github-actions[bot]"
body-includes: "<!-- e2e-test-results -->"

- name: Get existing comment body
if: steps.find-comment.outputs.comment-id != ''
Expand Down Expand Up @@ -130,9 +130,9 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-workflow-dev
with:
setup-rust: 'true'
install-args: '--ignore-scripts'
build-packages: 'false'
setup-rust: "true"
install-args: "--ignore-scripts"
build-packages: "false"

- name: Run Unit Tests
run: pnpm test --filter='!./docs'
Expand Down Expand Up @@ -212,6 +212,9 @@ jobs:
- name: "astro"
project-id: "prj_YDAXj3K8LM0hgejuIMhioz2yLgTI"
project-slug: "workbench-astro-workflow"
- name: "nextjs-pages"
project-id: "prj_9ttXonF6FkgEMx09rWge5AX5dbkH"
project-slug: "workbench-nextjs-pages-router"
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
Expand All @@ -222,7 +225,7 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-workflow-dev
with:
build-packages: 'false'
build-packages: "false"

- name: Build CLI
run: pnpm turbo run build --filter='@workflow/cli'
Expand All @@ -243,7 +246,7 @@ jobs:
env:
DEPLOYMENT_URL: ${{ steps.waitForDeployment.outputs.deployment-url }}
APP_NAME: ${{ matrix.app.name }}
WORKFLOW_VERCEL_SKIP_PROXY: 'true'
WORKFLOW_VERCEL_SKIP_PROXY: "true"
WORKFLOW_VERCEL_ENV: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }}
WORKFLOW_VERCEL_AUTH_TOKEN: ${{ secrets.VERCEL_LABS_TOKEN }}
WORKFLOW_VERCEL_TEAM: "team_nO2mCG4W8IxPIeKoSsqwAxxB"
Expand Down Expand Up @@ -279,8 +282,8 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-workflow-dev
with:
install-dependencies: 'false'
build-packages: 'false'
install-dependencies: "false"
build-packages: "false"

- id: set-matrix
run: echo "matrix=$(node ./scripts/create-test-matrix.mjs)" >> $GITHUB_OUTPUT
Expand All @@ -304,8 +307,8 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-workflow-dev
with:
install-dependencies: 'false'
build-packages: 'false'
install-dependencies: "false"
build-packages: "false"

- name: Setup canary
if: ${{ matrix.app.canary }}
Expand Down Expand Up @@ -366,8 +369,8 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-workflow-dev
with:
install-dependencies: 'false'
build-packages: 'false'
install-dependencies: "false"
build-packages: "false"

- name: Setup canary
if: ${{ matrix.app.canary }}
Expand Down Expand Up @@ -448,8 +451,8 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-workflow-dev
with:
install-dependencies: 'false'
build-packages: 'false'
install-dependencies: "false"
build-packages: "false"

- name: Setup canary
if: ${{ matrix.app.canary }}
Expand Down Expand Up @@ -572,8 +575,8 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-workflow-dev
with:
install-dependencies: 'false'
build-packages: 'false'
install-dependencies: "false"
build-packages: "false"

- id: set-matrix
run: echo "matrix=$(node ./scripts/create-community-worlds-matrix.mjs)" >> $GITHUB_OUTPUT
Expand All @@ -598,7 +601,15 @@ jobs:
summary:
name: E2E Summary
runs-on: ubuntu-latest
needs: [e2e-vercel-prod, e2e-local-dev, e2e-local-prod, e2e-local-postgres, e2e-windows, e2e-community]
needs:
[
e2e-vercel-prod,
e2e-local-dev,
e2e-local-prod,
e2e-local-postgres,
e2e-windows,
e2e-community,
]
if: always() && !cancelled()
timeout-minutes: 10

Expand Down
1 change: 1 addition & 0 deletions packages/core/e2e/local-build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe.each([
'express',
'fastify',
'astro',
'nextjs-pages-router',
])('e2e', (project) => {
test('builds without errors', { timeout: 180_000 }, async () => {
// skip if we're targeting specific app to test
Expand Down
Loading
Loading