-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (78 loc) · 2.5 KB
/
Copy pathe2e.yml
File metadata and controls
81 lines (78 loc) · 2.5 KB
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
name: E2E
on:
push:
branches:
- master
- '[0-9]+.x.x'
pull_request:
branches:
- master
- '[0-9]+.x.x'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.head_ref || github.ref_name || github.event.ref }}
cancel-in-progress: true
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: 'false'
CYPRESS_VERIFY_TIMEOUT: 120000
PERCY_BROWSER_EXECUTABLE: /usr/bin/chromium
PERCY_SKIP_UPDATE_CHECK: 'true'
PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
SB_CHROMIUM_PATH: /usr/bin/chromium
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
path: 'skyux-icons'
fetch-depth: '0'
token: '${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}'
- name: Checkout skyux
uses: actions/checkout@v5
with:
repository: 'blackbaud/skyux'
ref: 'main'
path: 'skyux'
token: '${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}'
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version-file: 'skyux/.nvmrc'
- name: Install dependencies
run: npm ci
working-directory: 'skyux-icons'
- name: Build project
run: npm run build
working-directory: 'skyux-icons'
- name: Install skyux
run: npm ci
working-directory: 'skyux'
env:
CYPRESS_INSTALL_BINARY: 0
- name: Install Cypress
run: |
set -euxo pipefail
npx cypress install
npx cypress verify
working-directory: 'skyux'
- name: Build Storybooks
run: npx nx build-storybook icon-storybook --no-dte
working-directory: 'skyux'
env:
NX_CLOUD_ACCESS_TOKEN: '${{ secrets.NX_CLOUD_ACCESS_TOKEN }}'
- name: Apply icon preview link tag
run: |
for idx in dist/storybook/*/iframe.html; do
echo "Adding skyux-icons.svg to $idx"
sed -i'' 's~</head>~<link rel="prefetch" href="./skyux-icons.svg" class="skyux-icons-preview"></head>~' $idx
cp -v ../skyux-icons/dist/assets/svg/skyux-icons.svg $(dirname $idx)/
done
working-directory: 'skyux'
- name: Run e2e tests
run: |
npx percy exec -- npx nx e2e icon-storybook-e2e -c prebuilt --no-dte --skip-nx-cache
working-directory: 'skyux'
env:
PERCY_TOKEN: '${{ secrets.PERCY_TOKEN }}'