Skip to content

Commit 98808b1

Browse files
committed
Merge pull request #1 from endformdev/oliver/e2e-pr
Add PR e2e workflow
1 parent 5971af1 commit 98808b1

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Run end to end tests with endform
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
id-token: write # required for authentication with Endform
11+
12+
jobs:
13+
e2e:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up pnpm
22+
uses: pnpm/action-setup@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: lts/*
28+
cache: 'pnpm'
29+
30+
- name: Install dependencies
31+
run: pnpm install
32+
33+
- name: Wait for Vercel deployment
34+
uses: endformdev/actions/await-vercel-deployment@main
35+
with:
36+
project-name: endform-playwright-tutorial
37+
set-url-env-var: BASE_URL # Sets the Vercel preview URL as the BASE_URL environment variable
38+
39+
- name: Run end to end tests with endform
40+
run: |
41+
npx endform@latest test

middleware.ts renamed to proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { signToken, verifyToken } from "@/lib/auth/session";
44

55
const protectedRoutes = "/dashboard";
66

7-
export async function middleware(request: NextRequest) {
7+
export async function proxy(request: NextRequest) {
88
const { pathname } = request.nextUrl;
99
const sessionCookie = request.cookies.get("session");
1010
const isProtectedRoute = pathname.startsWith(protectedRoutes);

0 commit comments

Comments
 (0)