-
Notifications
You must be signed in to change notification settings - Fork 83
86 lines (73 loc) · 2.52 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
77
78
79
80
81
82
83
84
85
86
name: "Tests: release bundle"
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
integration:
name: Run end-to-end tests
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
TEST_PROJECT_LIST: github_linux
- os: macos-latest
TEST_PROJECT_LIST: github_mac
runs-on: ${{ matrix.os }}
timeout-minutes: 25
steps:
# prepare core binaries
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- name: Install dependencies
run: yarn
# run lint
- name: Run tests
run: yarn lint
# playwright recommends if you cache the binaries to keep it tied to the version of playwright you are using.
# https://playwright.dev/docs/ci#caching-browsers
- name: Get current Playwright version
id: playwright-version
run: |
echo version=$(npm info @playwright/test version) >> $GITHUB_OUTPUT
- name: Cache Playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: |
**/node_modules/playwright
~/.cache/ms-playwright
~/Library/Caches/ms-playwright
%USERPROFILE%\AppData\Local\ms-playwright
key: ${{ runner.os }}-${{ runner.arch }}-cache-playwright-${{ steps.playwright-version.outputs.version }}
- name: Playwright info
run: |
echo "OS: ${{ matrix.os }}"
echo "Playwright version: ${{ steps.playwright-version.outputs.version }}"
echo "Playwright install dir: ~/.cache/ms-playwright"
echo "Cache key: ${{ runner.os }}-${{ runner.arch }}-cache-playwright-${{ steps.playwright-version.outputs.version }}"
echo "Cache hit: ${{ steps.playwright-cache.outputs.cache-hit == 'true' }}"
- name: Install Playwright
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
# run tests
- name: Run tests
run: TEST_PROJECT_LIST="${{matrix.TEST_PROJECT_LIST}}" yarn test
- uses: actions/upload-artifact@v3
if: failure()
with:
name: playwright-report
path: |
test-results/
playwright-report/
tests/**/__screenshots__/github_*
retention-days: 5