Problem with palywright e2e env vars on Vercel
I'm working on E2E testing using Playwright with a Next.js project deployed on Vercel. In my local environment, everything works fine as I have my user and password variables defined in an .env file. However, I'm encountering a problem when running tests in the Vercel preview environment.
The environment variables defined as:
env
result in
undefined
in the Vercel preview environment.
I have set up these variables in Vercel, but I'm not sure how to correctly pass them to my GitHub Actions workflow. Does anyone have experience with this setup or could offer some guidance on how to ensure these environment variables are available in GitHub Actions when running tests with Playwright in a Vercel preview environment?2 Replies