Vercel E2E #314
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions/cache@v3, but it would always get cache miss since it runs on deployment_status trigger | |
# See - https://github.com/actions/cache/issues/319 | |
# If GitHub would allow deployment_status trigger to access cache, it would work here too | |
name: Vercel E2E | |
on: | |
deployment_status: | |
workflow_dispatch: | |
inputs: | |
deploymentUrl: | |
description: 'The deployment URL to test with' | |
required: true | |
prNumber: | |
description: 'Pull request number (optional)' | |
required: false | |
jobs: | |
vercel-e2e: | |
if: github.event.inputs.deploymentUrl || (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.target_url, 'vercel-demo-wix-cms')) # TODO: change to your site name | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn | |
- uses: ./.github/actions/setup-playwright | |
- name: Set Run with URL | |
run: | | |
echo "setting DEPLOYMENT_URL=${{ github.event.inputs.deploymentUrl || github.event.deployment_status.target_url }}" | |
echo "DEPLOYMENT_URL=${{ github.event.inputs.deploymentUrl || github.event.deployment_status.target_url }}" >> $GITHUB_ENV | |
- uses: ./.github/actions/run-playwright | |
id: runPlaywright | |
with: | |
provider: 'vercel' | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
prNumber: ${{ github.event.inputs.prNumber }} | |
provider-deployment-url: ${{ env.DEPLOYMENT_URL }} |