-
Notifications
You must be signed in to change notification settings - Fork 18
76 lines (62 loc) · 2.15 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# e2e test for transcoder
name: End-to-End Tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Run-wpe2e-TestCase:
# The type of runner that the job will run on
name: Playwright Tests
runs-on: ubuntu-latest
env:
SHA: ${{ github.event.pull_request.head.sha }}
COMMIT_SHA: ${{ github.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
working-directory: ./tests/e2e-playwright
TESRESULT_TOKEN: ${{ secrets.TESRESULT_TOKEN }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 17
cache: "npm"
cache-dependency-path: tests/e2e-playwright/package-lock.json
- name: Install npm dependencies
run: npm install
working-directory: ${{env.working-directory}}
- name: Build Playwright utils dependencies
run: npm run build
working-directory: ${{env.working-directory}}
- name: Install browser
run: npx playwright install chromium
working-directory: ${{env.working-directory}}
- name: Run End to End tests
run: npm run test-e2e:playwright -- test
working-directory: ${{env.working-directory}}
- name: run PR status
if: ${{ always() }}
run: node ./tests/e2e-playwright/bin/pr-status.js
working-directory: ${{env.working_directory}}
- name: Make reports available
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: playwright-report
retention-days: 2
path: |
${{ github.workspace }}/playwright-report