-
Notifications
You must be signed in to change notification settings - Fork 609
82 lines (69 loc) · 3.41 KB
/
run-testcafe-on-gh-pages.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
name: Test demos from gh-pages branch before publishing
on:
workflow_dispatch:
jobs:
testcafe:
strategy:
fail-fast: false
matrix:
CONSTEL: [react(1/4), react(2/4), react(3/4), react(4/4), vue(1/4), vue(2/4), vue(3/4), vue(4/4), angular(1/4), angular(2/4), angular(3/4), angular(4/4)]
THEME: ['generic.light', 'material.blue.light', 'fluent.blue.light']
runs-on: ubuntu-latest
name: testcafe-${{ matrix.CONSTEL }}-${{ matrix.THEME }}
timeout-minutes: 60
env:
TARGET_BRANCH: ${{ github.ref_name }}
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Run Web Server
working-directory: gh-pages
run: |
python -m http.server 8080 &
python -m http.server 8081 &
python -m http.server 8082 &
python -m http.server 8083 &
- name: Checkout main branch
uses: actions/checkout@v2
with:
ref: ${{ env.TARGET_BRANCH }}
path: devextreme
- name: Console.log ls
run: ls -al & cd gh-pages & ls -al
- name: Setup Chrome
uses: ./devextreme/.github/actions/setup-chrome
with:
chrome-version: '121.0.6167.160'
- name: DevExtreme - Install packages
working-directory: devextreme
run: npm install --no-audit --no-fund
- name: Run TestCafe tests
working-directory: devextreme/apps/demos
env:
CHANGEDFILEINFOSPATH: changed-files.json
BROWSERS: chrome:headless --disable-partial-raster --disable-skia-runtime-opts --run-all-compositor-stages-before-draw --disable-new-content-rendering-timeout --disable-threaded-animation --disable-threaded-scrolling --disable-checker-imaging --disable-image-animation-resync --use-gl="swiftshader" --disable-features=PaintHolding --js-flags=--random-seed=2147483647 --font-render-hinting=none --disable-font-subpixel-positioning
#DEBUG: hammerhead:*,testcafe:*
CONCURRENCY: 4
TCQUARANTINE: true
CONSTEL: ${{ matrix.CONSTEL }}
THEME: ${{ matrix.THEME }}
ISGITHUBDEMOS: true
# DISABLE_DEMO_TEST_SETTINGS: all # Uncomment to ignore all the visualtestrc.json settings
# DISABLE_DEMO_TEST_SETTINGS: ignore # Uncomment to ignore the `ignore` field
# DISABLE_DEMO_TEST_SETTINGS: comparison-options # Uncomment to ignore the `comparison-options` field
CI_ENV: true # The `ignore` field in the visualtestrc.json should be disabled when running test locally
run: npx nx test-testcafe
- name: Copy screenshots artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: screenshots
path: ${{ github.workspace }}/devextreme/apps/demos/testing/artifacts/compared-screenshots/**/*
if-no-files-found: ignore