-
Notifications
You must be signed in to change notification settings - Fork 1.4k
57 lines (53 loc) · 1.62 KB
/
ui_tests.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
name: UI Tests
on:
push:
branches: ['V3']
paths-ignore:
- '**.md'
pull_request:
branches: ['V3']
paths-ignore:
- '**.md'
concurrency:
# Support push/pr as event types with different behaviors each:
# 1. push: queue up builds
# 2. pr: only allow one run per PR
group: ${{ github.workflow }}-${{ github.event.type }}${{ github.event.pull_request.number }}
# If there is already a workflow running for the same pull request, cancel it
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
e2e_tests:
name: 'Playwright Tests - ${{ matrix.project }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
timeout-minutes: 10
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: install
run: npm ci
- name: build
run: npm run build
- name: Install Playwright Browsers
working-directory: ./apps/laboratory/
run: npm run playwright:install
- name: Run Playwright tests
env:
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }}
working-directory: ./apps/laboratory/
run: npm run playwright:test:${{ matrix.project }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report-${{ matrix.project }}
path: ./apps/laboratory/playwright-report/
retention-days: 7