GitHub action which allows you to run Cypress tests against a Vercel preview deployment.
This guide assumes you have set up the Vercel GitHub integration.
To use this action you will need to first generate a Vercel token.
Then you can either store this with your account or repository's secrets.
The following action will wait for the Vercel deployment to finish, then run Cypress but override the URL provided to Cypress' config to the latest Vercel deployment URL.
name: my-action
on: deployment
jobs:
regression:
runs-on: ubuntu-latest
steps:
- uses: actions/vercel-cypress@v1
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
repo: my-repo