-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.39 KB
/
netlify-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Netlify E2E
on:
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
deploymentUrl:
description: 'The deployment URL to test with'
required: true
prNumber:
description: 'Pull request number (optional)'
required: false
jobs:
netlify-e2e:
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: Waiting for 200 from the Netlify Preview
if: ${{ !github.event.inputs.deploymentUrl }}
uses: jakepartusch/[email protected]
id: waitFor200
with:
site_name: "wix-commerce-ticketing-nextjs-templat" # TODO: change to your site name
max_timeout: 120 # 2 Minutes, depends on your build pipeline duration
- name: Set Run with URL
run: |
echo "DEPLOYMENT_URL=${{ github.event.inputs.deploymentUrl || steps.waitFor200.outputs.url }}" >> $GITHUB_ENV
- uses: ./.github/actions/run-playwright
id: runPlaywright
with:
provider: 'netlify'
githubToken: ${{ secrets.GITHUB_TOKEN }}
prNumber: ${{ github.event.inputs.prNumber || github.event.pull_request.number }}
provider-deployment-url: ${{ env.DEPLOYMENT_URL }}