Skip to content

Commit 7f0013c

Browse files
authored
Update CI (#793)
1 parent bae6097 commit 7f0013c

File tree

2 files changed

+45
-46
lines changed

2 files changed

+45
-46
lines changed

.github/workflows/ci.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- name: Use Node.js
14-
uses: actions/setup-node@v3
15-
with: { node-version: 16 }
16-
- run: yarn install
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
cache: npm
17+
18+
- name: Install dependencies
19+
run: npm ci
20+
1721
- name: Run headless test
18-
uses: GabrielBB/xvfb-action@v1
22+
uses: coactions/setup-xvfb@v1
1923
env:
2024
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
2125
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
2226
with:
23-
run: yarn test:ci
27+
run: npm run test:ci

testem-ci.js

+34-39
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,39 @@
11
/* eslint-env node */
22
module.exports = {
3-
"framework": "qunit",
4-
"parallel": 5,
5-
"disable_watching": true,
6-
"timeout": 600,
7-
"browser_start_timeout": 90,
8-
"test_page": "tests/index.html?hidepassed",
9-
"on_start": "./sauce_labs/saucie-connect.js",
10-
"on_exit": "./sauce_labs/saucie-disconnect.js",
11-
"port": 8080,
12-
"launchers": {
13-
"SL_Chrome_Current": {
14-
"exe": "saucie",
15-
"args": ["-b", "chrome", "-p", "Windows 10", "-v", "latest", "--no-connect", "-u"],
16-
"protocol": "tap"
3+
framework: 'qunit',
4+
parallel: 5,
5+
disable_watching: true,
6+
timeout: 600,
7+
browser_start_timeout: 90,
8+
test_page: 'tests/index.html?hidepassed',
9+
on_start: './sauce_labs/saucie-connect.js',
10+
on_exit: './sauce_labs/saucie-disconnect.js',
11+
port: 8080,
12+
launchers: {
13+
SL_Chrome_Current: {
14+
exe: 'saucie',
15+
args: ['-b', 'chrome', '-p', 'Windows 10', '-v', 'latest', '--no-connect', '-u'],
16+
protocol: 'tap',
1717
},
18-
"SL_MS_Edge": {
19-
"exe": "saucie",
20-
"args": ["-b", "microsoftedge", "-v", "latest", "--no-connect", "-u"],
21-
"protocol": "tap"
18+
SL_MS_Edge: {
19+
exe: 'saucie',
20+
args: ['-b', 'microsoftedge', '-v', 'latest', '--no-connect', '-u'],
21+
protocol: 'tap',
2222
},
23-
"SL_Safari_Current": {
24-
"exe": "saucie",
25-
"args": ["-b", "safari", "-v", "latest", "--no-connect", "-u"],
26-
"protocol": "tap"
27-
}
23+
SL_Safari_Current: {
24+
exe: 'saucie',
25+
args: ['-b', 'safari', '-v', 'latest', '--no-connect', '-u'],
26+
protocol: 'tap',
27+
},
28+
},
29+
launch_in_ci: ['Chrome', 'Firefox', ...(process.env.SAUCE_ACCESS_KEY ? ['SL_Safari_Current', 'SL_MS_Edge'] : [])], // eslint-disable-line no-process-env
30+
browser_args: {
31+
Chrome: [
32+
'--no-sandbox', // Fixes issue starting ChromeHeadless, see https://github.com/travis-ci/travis-ci/issues/9024
33+
'--disable-gpu',
34+
'--headless',
35+
'--remote-debugging-port=9222',
36+
'--window-size=1440,900',
37+
],
2838
},
29-
"launch_in_ci": [
30-
"Chrome",
31-
"Firefox",
32-
"SL_Safari_Current",
33-
"SL_MS_Edge"
34-
],
35-
"browser_args": {
36-
"Chrome": [
37-
"--no-sandbox", // Fixes issue starting ChromeHeadless, see https://github.com/travis-ci/travis-ci/issues/9024
38-
"--disable-gpu",
39-
"--headless",
40-
"--remote-debugging-port=9222",
41-
"--window-size=1440,900"
42-
]
43-
}
44-
};
39+
}

0 commit comments

Comments
 (0)