-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (30 loc) · 1.2 KB
/
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
name: E2E
on: deployment_status
jobs:
e2e:
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome, edge, firefox, webkit]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
# cache: 'npm' # currently npm cache doesn't work in deployment_status
- run: npm ci
- run: npx playwright install-deps webkit
if: matrix.browser == 'webkit'
- uses: cypress-io/github-action@v6
with:
install: false
browser: ${{ matrix.browser }}
env:
CYPRESS_BASE_URL: ${{ github.event.deployment_status.environment_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }}
CYPRESS_CONTENTFUL_ACCESS_TOKEN: ${{ github.event.deployment_status.environment == 'Production' && secrets.CONTENTFUL_ACCESS_TOKEN_PROD || secrets.CONTENTFUL_ACCESS_TOKEN_DEVELOP }}
CYPRESS_ENVIRONMENT: ${{ github.event.deployment_status.environment }}