-
Notifications
You must be signed in to change notification settings - Fork 12
47 lines (46 loc) · 1.46 KB
/
e2e-tests.yaml
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
43
44
45
46
47
name: E2E Test
on:
push:
branches: cypress-experiment
pull_request:
types: [opened, reopened]
jobs:
e2e-tests:
runs-on: [ubuntu-latest]
concurrency:
group: ${{ github.workflow }}-ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
deployments: write
name: Run E2E Tests
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
id: cloudflare_deploy
with:
apiToken: ${{ secrets.CYPRESS_TEST_CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CYPRESS_TEST_CLOUDFLARE_ACCOUNT_ID }}
projectName: cypresstest
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Cypress run
uses: cypress-io/github-action@v5
env:
TEST_USERNAME: ${{ secrets.CYPRESS_TEST_USERNAME}}
TEST_PASSWORD: ${{ secrets.CYPRESS_TEST_PASSWORD }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_TEST_RECORD_ID}}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_TEST_PROJECT_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
install: false
config: pageLoadTimeout=100000,baseUrl=${{ steps.cloudflare_deploy.outputs.url }}
record: true
parallel: true