File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ export default defineConfig({
2828 /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2929 use : {
3030 /* Base URL to use in actions like `await page.goto('/')`. */
31- baseURL : "https://endform-playwright-tutorial.vercel.app" ,
31+ baseURL :
32+ process . env . BASE_URL || "https://endform-playwright-tutorial.vercel.app" ,
3233 // You can use this localhost baseURL if you are running the application locally
3334 // baseURL: "http://localhost:3000",
3435
You can’t perform that action at this time.
0 commit comments