Skip to content

Commit 0cc2fc3

Browse files
fix(ci): switch Cypress browser to Chrome to fix redirect issues in CI
1 parent 7371183 commit 0cc2fc3

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Run integration test (CRA)
6161
run: |
62-
npx start-server-and-test start:api 3001 start:cra http-get://127.0.0.1:3000 "npm run cypress:run -- --browser chrome"
62+
npx start-server-and-test start:api 3001 start:cra http-get://127.0.0.1:3000 "npm run cypress:run -- --browser chrome --headless --no-sandbox"
6363
env:
6464
CI: true
6565

cypress.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,17 @@ module.exports = defineConfig({
1111
mochaFile: 'test-results/cypress/junit-[hash].xml',
1212
},
1313
e2e: {
14-
setupNodeEvents(on, config) {},
14+
setupNodeEvents(on, config) {
15+
on('before:browser:launch', (browser = {}, launchOptions) => {
16+
if (browser.name === 'chrome' || browser.name === 'chromium') {
17+
launchOptions.args.push('--no-sandbox')
18+
launchOptions.args.push('--disable-gpu')
19+
launchOptions.args.push('--disable-dev-shm-usage')
20+
launchOptions.args.push('--disable-software-rasterizer')
21+
}
22+
return launchOptions
23+
})
24+
},
1525
baseUrl: 'http://localhost:3000',
1626
supportFile: false,
1727
},

0 commit comments

Comments
 (0)