Skip to content

Commit 1e828d0

Browse files
authored
CI: improve jobs stability (DevExpress#29187)
1 parent 63a835b commit 1e828d0

File tree

1,636 files changed

+1928
-1784
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,636 files changed

+1928
-1784
lines changed

.github/actions/run-qunit-tests/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ runs:
5252

5353
- name: Setup Chrome
5454
if: ${{ inputs.browser == 'chrome' }}
55-
uses: ./.github/actions/setup-chrome
55+
uses: ./.github/actions/setup-chrome-headless-shell
5656
with:
5757
chrome-version: '133.0.6943.53'
5858

@@ -139,6 +139,7 @@ runs:
139139
GITHUBACTION: "true"
140140
TARGET: "test"
141141
DISPLAY: ":99"
142+
CHROME_CMD: ${{ env.CHROME_SHELL }}
142143
run: |
143144
chmod +x ./docker-ci.sh
144145
./docker-ci.sh
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Chrome headless shell installer
2+
description: Install chrome-headless-shell
3+
4+
# Chrome headless shell
5+
# https://developer.chrome.com/blog/chrome-headless-shell
6+
7+
inputs:
8+
chrome-version:
9+
description: Chrome headless shell version to install
10+
default: "latest"
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Setup chrome-headless-shell
16+
shell: bash
17+
env:
18+
CHROME_VERSION: ${{ inputs.chrome-version }}
19+
run: |
20+
if [ -n "$CHROME_VERSION" ]; then
21+
sudo apt-get update
22+
sudo apt-get -y install libu2f-udev
23+
sudo apt-get -y install dbus
24+
25+
echo "version to install: $CHROME_VERSION"
26+
CHROME_BIN=`npx @puppeteer/browsers install chrome-headless-shell@$CHROME_VERSION | awk '{print $2}'`
27+
chmod +x $CHROME_BIN
28+
echo "chrome-headless-shell installed in: $CHROME_BIN"
29+
$CHROME_BIN --version
30+
echo "CHROME_SHELL=$CHROME_BIN" >> $GITHUB_ENV
31+
else
32+
echo "chrome-headless-shell not installed!"
33+
fi
34+

.github/workflows/qunit_tests-additional-renovation.yml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,28 @@ jobs:
111111
useJQuery: 'false'
112112
useCsp: 'true'
113113

114-
qunit-tests-performance:
115-
needs: build
116-
runs-on: devextreme-shr2
117-
name: Performance
118-
timeout-minutes: 25
119-
steps:
120-
- name: Get sources
121-
uses: actions/checkout@v4
122-
123-
- name: Run QUnit tests
124-
uses: ./.github/actions/run-qunit-tests
125-
with:
126-
name: 'Performance'
127-
browser: 'chrome'
128-
isPerformance: 'true'
129-
useJQuery: 'true'
130-
headless: 'false'
131-
useCsp: 'false'
114+
# TODO Chrome133: skipped during chrome update
115+
# We should run performance tests with non headless chrome
116+
# It fails in headless mode
117+
118+
# qunit-tests-performance:
119+
# needs: build
120+
# runs-on: devextreme-shr2
121+
# name: Performance
122+
# timeout-minutes: 25
123+
# steps:
124+
# - name: Get sources
125+
# uses: actions/checkout@v4
126+
#
127+
# - name: Run QUnit tests
128+
# uses: ./.github/actions/run-qunit-tests
129+
# with:
130+
# name: 'Performance'
131+
# browser: 'chrome'
132+
# isPerformance: 'true'
133+
# useJQuery: 'true'
134+
# headless: 'true'
135+
# useCsp: 'false'
132136

133137
qunit-tests-mobile-and-shadow-dom:
134138
needs: build
@@ -157,7 +161,6 @@ jobs:
157161
]
158162
kind: [ 'shadow-dom', 'ios10', 'android6' ]
159163
include:
160-
- headless: false
161164
- kind: 'shadow-dom'
162165
userAgent: ''
163166
useShadowDom: true
@@ -166,10 +169,6 @@ jobs:
166169
- kind: 'android6'
167170
userAgent: 'android6'
168171
useJQuery: true
169-
- constel: 'ui'
170-
headless: true
171-
- constel: 'viz'
172-
headless: true
173172

174173
steps:
175174
- name: Get sources
@@ -184,7 +183,7 @@ jobs:
184183
useJQuery: ${{ matrix.useJquery || 'false' }}
185184
userAgent: ${{ matrix.userAgent }}
186185
useShadowDom: ${{ matrix.useShadowDom }}
187-
headless: ${{ matrix.headless }}
186+
headless: 'true'
188187
useCsp: 'true'
189188

190189
qunit-tests-firefox:
@@ -279,7 +278,7 @@ jobs:
279278
needs: [
280279
build,
281280
qunit-tests-timezones,
282-
qunit-tests-performance,
281+
# qunit-tests-performance,
283282
qunit-tests-mobile-and-shadow-dom,
284283
qunit-tests-firefox,
285284
qunit-tests-no-csp

.github/workflows/testcafe_tests.yml

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,33 @@ jobs:
7979
fail-fast: false
8080
matrix:
8181
ARGS: [
82-
{ componentFolder: "accessibility", name: "accessibility (1/7)", indices: "1/7" },
83-
{ componentFolder: "accessibility", name: "accessibility (2/7)", indices: "2/7" },
84-
{ componentFolder: "accessibility", name: "accessibility (3/7)", indices: "3/7" },
85-
{ componentFolder: "accessibility", name: "accessibility (4/7)", indices: "4/7" },
86-
{ componentFolder: "accessibility", name: "accessibility (5/7)", indices: "5/7" },
87-
{ componentFolder: "accessibility", name: "accessibility (6/7)", indices: "6/7" },
88-
{ componentFolder: "accessibility", name: "accessibility (7/7)", indices: "7/7" },
89-
{ componentFolder: "accessibility", name: "accessibility - material (1/7)", theme: "material.blue.light", indices: "1/7" },
90-
{ componentFolder: "accessibility", name: "accessibility - material (2/7)", theme: "material.blue.light", indices: "2/7" },
91-
{ componentFolder: "accessibility", name: "accessibility - material (3/7)", theme: "material.blue.light", indices: "3/7" },
92-
{ componentFolder: "accessibility", name: "accessibility - material (4/7)", theme: "material.blue.light", indices: "4/7" },
93-
{ componentFolder: "accessibility", name: "accessibility - material (5/7)", theme: "material.blue.light", indices: "5/7" },
94-
{ componentFolder: "accessibility", name: "accessibility - material (6/7)", theme: "material.blue.light", indices: "6/7" },
95-
{ componentFolder: "accessibility", name: "accessibility - material (7/7)", theme: "material.blue.light", indices: "7/7" },
96-
{ componentFolder: "accessibility", name: "accessibility - fluent (1/7)", theme: "fluent.blue.light", indices: "1/7" },
97-
{ componentFolder: "accessibility", name: "accessibility - fluent (2/7)", theme: "fluent.blue.light", indices: "2/7" },
98-
{ componentFolder: "accessibility", name: "accessibility - fluent (3/7)", theme: "fluent.blue.light", indices: "3/7" },
99-
{ componentFolder: "accessibility", name: "accessibility - fluent (4/7)", theme: "fluent.blue.light", indices: "4/7" },
100-
{ componentFolder: "accessibility", name: "accessibility - fluent (5/7)", theme: "fluent.blue.light", indices: "5/7" },
101-
{ componentFolder: "accessibility", name: "accessibility - fluent (6/7)", theme: "fluent.blue.light", indices: "6/7" },
102-
{ componentFolder: "accessibility", name: "accessibility - fluent (7/7)", theme: "fluent.blue.light", indices: "7/7" },
82+
{ componentFolder: "accessibility/common", name: "accessibility (1/7)", indices: "1/7" },
83+
{ componentFolder: "accessibility/common", name: "accessibility (2/7)", indices: "2/7" },
84+
{ componentFolder: "accessibility/common", name: "accessibility (3/7)", indices: "3/7" },
85+
{ componentFolder: "accessibility/common", name: "accessibility (4/7)", indices: "4/7" },
86+
{ componentFolder: "accessibility/common", name: "accessibility (5/7)", indices: "5/7" },
87+
{ componentFolder: "accessibility/common", name: "accessibility (6/7)", indices: "6/7" },
88+
{ componentFolder: "accessibility/common", name: "accessibility (7/7)", indices: "7/7" },
89+
{ componentFolder: "accessibility/common", name: "accessibility - material (1/7)", theme: "material.blue.light", indices: "1/7" },
90+
{ componentFolder: "accessibility/common", name: "accessibility - material (2/7)", theme: "material.blue.light", indices: "2/7" },
91+
{ componentFolder: "accessibility/common", name: "accessibility - material (3/7)", theme: "material.blue.light", indices: "3/7" },
92+
{ componentFolder: "accessibility/common", name: "accessibility - material (4/7)", theme: "material.blue.light", indices: "4/7" },
93+
{ componentFolder: "accessibility/common", name: "accessibility - material (5/7)", theme: "material.blue.light", indices: "5/7" },
94+
{ componentFolder: "accessibility/common", name: "accessibility - material (6/7)", theme: "material.blue.light", indices: "6/7" },
95+
{ componentFolder: "accessibility/common", name: "accessibility - material (7/7)", theme: "material.blue.light", indices: "7/7" },
96+
{ componentFolder: "accessibility/common", name: "accessibility - fluent (1/7)", theme: "fluent.blue.light", indices: "1/7" },
97+
{ componentFolder: "accessibility/common", name: "accessibility - fluent (2/7)", theme: "fluent.blue.light", indices: "2/7" },
98+
{ componentFolder: "accessibility/common", name: "accessibility - fluent (3/7)", theme: "fluent.blue.light", indices: "3/7" },
99+
{ componentFolder: "accessibility/common", name: "accessibility - fluent (4/7)", theme: "fluent.blue.light", indices: "4/7" },
100+
{ componentFolder: "accessibility/common", name: "accessibility - fluent (5/7)", theme: "fluent.blue.light", indices: "5/7" },
101+
{ componentFolder: "accessibility/common", name: "accessibility - fluent (6/7)", theme: "fluent.blue.light", indices: "6/7" },
102+
{ componentFolder: "accessibility/common", name: "accessibility - fluent (7/7)", theme: "fluent.blue.light", indices: "7/7" },
103+
{ componentFolder: "accessibility/list", name: "accessibility - list (1/2)", indices: "1/2" },
104+
{ componentFolder: "accessibility/list", name: "accessibility - list (1/2)", indices: "2/2" },
105+
{ componentFolder: "accessibility/list", name: "accessibility - list - material (1/2)", theme: "material.blue.light", indices: "1/2" },
106+
{ componentFolder: "accessibility/list", name: "accessibility - list - material (1/2)", theme: "material.blue.light", indices: "2/2" },
107+
{ componentFolder: "accessibility/list", name: "accessibility - list - fluent (1/2)", theme: "fluent.blue.light", indices: "1/2" },
108+
{ componentFolder: "accessibility/list", name: "accessibility - list - fluent (1/2)", theme: "fluent.blue.light", indices: "2/2" },
103109
{ componentFolder: "common", name: "common" },
104110
{ componentFolder: "common", name: "common - material", theme: 'material.blue.light' },
105111
{ componentFolder: "common", name: "common - fluent", theme: 'fluent.blue.light' },
@@ -112,9 +118,10 @@ jobs:
112118
{ componentFolder: "dataGrid/common", name: "dataGrid / common (3/5)", indices: "3/5" },
113119
{ componentFolder: "dataGrid/common", name: "dataGrid / common (4/5)", indices: "4/5" },
114120
{ componentFolder: "dataGrid/common", name: "dataGrid / common (5/5)", indices: "5/5" },
115-
{ componentFolder: "dataGrid/stickyColumns", name: "dataGrid / sticky (1/3)", indices: "1/3" },
116-
{ componentFolder: "dataGrid/stickyColumns", name: "dataGrid / sticky (2/3)", indices: "2/3" },
117-
{ componentFolder: "dataGrid/stickyColumns", name: "dataGrid / sticky (3/3)", indices: "3/3" },
121+
{ componentFolder: "dataGrid/sticky/common", name: "dataGrid / sticky common" },
122+
{ componentFolder: "dataGrid/sticky/fixed", name: "dataGrid / sticky (1/3)", indices: "1/3" },
123+
{ componentFolder: "dataGrid/sticky/fixed", name: "dataGrid / sticky (2/3)", indices: "2/3" },
124+
{ componentFolder: "dataGrid/sticky/fixed", name: "dataGrid / sticky (3/3)", indices: "3/3" },
118125
{ componentFolder: "pivotGrid", name: "pivotGrid", concurrency: 1 },
119126
{ componentFolder: "pivotGrid", name: "pivotGrid - material", theme: 'material.blue.light', concurrency: 1 },
120127
{ componentFolder: "pivotGrid", name: "pivotGrid - fluent", theme: 'fluent.blue.light', concurrency: 1 },

e2e/testcafe-devextreme/runner.js

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ const { globSync } = require('glob');
99
const testPageUtils = require('./helpers/clearPage');
1010
require('nconf').argv();
1111

12+
const LAUNCH_RETRY_ATTEMPTS = 5;
13+
const LAUNCH_RETRY_TIMEOUT = 20000;
14+
const TESTCAFE_CONFIG = {
15+
hostname: 'localhost',
16+
port1: 1437,
17+
port2: 1438,
18+
// eslint-disable-next-line spellcheck/spell-checker
19+
experimentalProxyless: true,
20+
};
21+
1222
const changeTheme = async(t, themeName) => createTestCafe.ClientFunction(() => new Promise((resolve) => {
1323
// eslint-disable-next-line no-undef
1424
window.DevExpress.ui.themes.ready(resolve);
@@ -33,15 +43,29 @@ const addShadowRootTree = async(t) => {
3343
}).with({ boundTestRun: t })();
3444
};
3545

46+
const wait = async(timeout) => new Promise(resolve => setTimeout(resolve, timeout));
47+
48+
const retry = async(action, attempt) => {
49+
return await action()
50+
.catch(async(error) => {
51+
if(attempt <= 1) {
52+
throw error;
53+
}
54+
55+
/* eslint-disable no-console */
56+
console.log('\n > error occurred during testcafe launch!\n');
57+
console.error(error);
58+
console.info(`\n > waiting ${LAUNCH_RETRY_TIMEOUT / 1000} seconds...\n`);
59+
await wait(LAUNCH_RETRY_TIMEOUT);
60+
console.info('\n > retry launching testcafe\n');
61+
/* eslint-enable no-console */
62+
return await retry(action, attempt - 1);
63+
});
64+
};
65+
3666
let testCafe;
37-
createTestCafe({
38-
hostname: 'localhost',
39-
port1: 1437,
40-
port2: 1438,
41-
// eslint-disable-next-line spellcheck/spell-checker
42-
experimentalProxyless: true,
43-
})
44-
.then(tc => {
67+
createTestCafe(TESTCAFE_CONFIG)
68+
.then(async(tc) => {
4569
testCafe = tc;
4670

4771
const args = getArgs();
@@ -164,13 +188,14 @@ createTestCafe({
164188
runOptions.disableScreenshots = true;
165189
}
166190

167-
return runner.run(runOptions);
191+
return await retry(() => runner.run(runOptions), LAUNCH_RETRY_ATTEMPTS);
168192
})
169193
.then(failedCount => {
170194
testCafe.close();
171195
process.exit(failedCount);
172196
});
173197

198+
174199
function setTestingPlatform(args) {
175200
process.env.platform = args.platform;
176201
}
@@ -186,7 +211,7 @@ function setShadowDom(args) {
186211
function expandBrowserAlias(browser, componentFolder) {
187212
switch(browser) {
188213
case 'chrome:devextreme-shr2':
189-
return 'chrome:headless --no-sandbox --disable-gpu --window-size=1200,800 --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';
214+
return 'chrome:headless --no-sandbox --disable-gpu --window-size=1200,800 --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 --font-render-hinting=none --disable-font-subpixel-positioning';
190215
case 'chrome:docker':
191216
return 'chromium:headless --no-sandbox --disable-gpu --window-size=1200,800';
192217
}

e2e/testcafe-devextreme/tests/accessibility/accordion.ts renamed to e2e/testcafe-devextreme/tests/accessibility/common/accordion.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { Properties } from 'devextreme/ui/accordion.d';
22
import { Selector as $ } from 'testcafe';
3-
import url from '../../helpers/getPageUrl';
4-
import { testAccessibility, Configuration } from '../../helpers/accessibility/test';
5-
import { Options } from '../../helpers/generateOptionMatrix';
3+
import url from '../../../helpers/getPageUrl';
4+
import { testAccessibility, Configuration } from '../../../helpers/accessibility/test';
5+
import { Options } from '../../../helpers/generateOptionMatrix';
66

77
fixture.disablePageReloads`Accessibility`
8-
.page(url(__dirname, '../container.html'));
8+
.page(url(__dirname, '../../container.html'));
99

1010
const items = ['Item_1', 'Item_2', 'Item_3'];
1111

e2e/testcafe-devextreme/tests/accessibility/actionSheet.ts renamed to e2e/testcafe-devextreme/tests/accessibility/common/actionSheet.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { Properties } from 'devextreme/ui/action_sheet.d';
2-
import url from '../../helpers/getPageUrl';
3-
import { testAccessibility, Configuration } from '../../helpers/accessibility/test';
4-
import { Options } from '../../helpers/generateOptionMatrix';
5-
import { isMaterial, isMaterialBased } from '../../helpers/themeUtils';
2+
import url from '../../../helpers/getPageUrl';
3+
import { testAccessibility, Configuration } from '../../../helpers/accessibility/test';
4+
import { Options } from '../../../helpers/generateOptionMatrix';
5+
import { isMaterial, isMaterialBased } from '../../../helpers/themeUtils';
66

77
fixture.disablePageReloads`Accessibility`
8-
.page(url(__dirname, '../container.html'));
8+
.page(url(__dirname, '../../container.html'));
99

1010
const items = [
1111
{ text: 'Call' },

e2e/testcafe-devextreme/tests/accessibility/autocomplete.ts renamed to e2e/testcafe-devextreme/tests/accessibility/common/autocomplete.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Properties } from 'devextreme/ui/autocomplete.d';
2-
import url from '../../helpers/getPageUrl';
3-
import { testAccessibility, Configuration } from '../../helpers/accessibility/test';
4-
import { Options } from '../../helpers/generateOptionMatrix';
2+
import url from '../../../helpers/getPageUrl';
3+
import { testAccessibility, Configuration } from '../../../helpers/accessibility/test';
4+
import { Options } from '../../../helpers/generateOptionMatrix';
55

66
fixture.disablePageReloads`Accessibility`
7-
.page(url(__dirname, '../container.html'));
7+
.page(url(__dirname, '../../container.html'));
88

99
const items = ['Item_1', 'Item_2', 'Item_3'];
1010

e2e/testcafe-devextreme/tests/accessibility/button.ts renamed to e2e/testcafe-devextreme/tests/accessibility/common/button.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { ClientFunction } from 'testcafe';
22
import { Properties } from 'devextreme/ui/button.d';
33
import Button from 'devextreme-testcafe-models/button';
4-
import { isMaterialBased } from '../../helpers/themeUtils';
5-
import url from '../../helpers/getPageUrl';
6-
import { defaultSelector, testAccessibility, Configuration } from '../../helpers/accessibility/test';
7-
import { Options } from '../../helpers/generateOptionMatrix';
4+
import { isMaterialBased } from '../../../helpers/themeUtils';
5+
import url from '../../../helpers/getPageUrl';
6+
import { defaultSelector, testAccessibility, Configuration } from '../../../helpers/accessibility/test';
7+
import { Options } from '../../../helpers/generateOptionMatrix';
88

99
fixture.disablePageReloads`Accessibility`
10-
.page(url(__dirname, '../container.html'));
10+
.page(url(__dirname, '../../container.html'));
1111

1212
const optionsWithSimpleItems: Options<Properties> = {
1313
useSubmitBehavior: [true, false],

e2e/testcafe-devextreme/tests/accessibility/buttonGroup.ts renamed to e2e/testcafe-devextreme/tests/accessibility/common/buttonGroup.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Properties } from 'devextreme/ui/button_group.d';
2-
import url from '../../helpers/getPageUrl';
3-
import { testAccessibility, Configuration } from '../../helpers/accessibility/test';
4-
import { Options } from '../../helpers/generateOptionMatrix';
2+
import url from '../../../helpers/getPageUrl';
3+
import { testAccessibility, Configuration } from '../../../helpers/accessibility/test';
4+
import { Options } from '../../../helpers/generateOptionMatrix';
55

66
fixture.disablePageReloads`Accessibility`
7-
.page(url(__dirname, '../container.html'));
7+
.page(url(__dirname, '../../container.html'));
88

99
const elementAttr = { 'aria-label': 'aria-label' };
1010

0 commit comments

Comments
 (0)