Skip to content
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/endform-tests-on-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run end to end tests with endform

on:
pull_request:
branches:
- main

permissions:
contents: read
id-token: write # required for authentication with Endform

jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Wait for Vercel deployment
uses: endformdev/actions/await-vercel-deployment@main
with:
project-name: endform-playwright-tutorial
set-url-env-var: BASE_URL # Sets the Vercel preview URL as the BASE_URL environment variable

- name: Run end to end tests with endform
run: |
npx endform@latest test
3 changes: 2 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: "https://endform-playwright-tutorial.vercel.app",
baseURL:
process.env.BASE_URL || "https://endform-playwright-tutorial.vercel.app",
// You can use this localhost baseURL if you are running the application locally
// baseURL: "http://localhost:3000",

Expand Down