Repository navigation
Commit 97df7e7
committed
ci(e2e): serve a production build instead of the dev server
The suite has been failing on CI while staying green locally: 19 failures
spread across admin navigation, the editor publish flow, bookmarking, the
feed sidebar and moderation. Identical failures on develop and on every
branch off it, so nothing in the feature work caused them.
They all share a cause. Playwright's webServer ran `next dev`, so the
first request to each route blocked on an on-demand Turbopack compile.
Locally that is under a second; on a cold runner with three workers
compiling at once it outlasts the 10s expect timeout — hence assertions
like `toHaveURL(/admin/users)` polling 13 times and giving up while the
navigation was still compiling.
CI now builds once and serves it. Measured on the same machine, a cold
route costs ~0.7-1.2s under `next dev` and ~0.02-0.03s prebuilt.
Local runs keep `next dev` for the fast feedback loop.
EMAIL_AUTH_ENABLED is set for the job because a production build runs with
NODE_ENV=production, which would otherwise disable the passwordless
provider that dev turns on implicitly.1 parent 7037484 commit 97df7e7
3 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
72 | 80 | | |
73 | | - | |
| 81 | + | |
74 | 82 | | |
75 | 83 | | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
0 commit comments