A platform for community discussion. Free, open, simple.
DEV: Switch to Chromium in CI
Loïc Guitaut99921120a1fe
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 926e3b67014..7a62df79f7e 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -61,6 +61,10 @@ jobs:- name: Set working directory ownerrun: chown root:root .+ - name: Remove Chrome+ continue-on-error: true+ run: apt remove -y google-chrome-stable+- uses: actions/checkout@v4with:fetch-depth: 1@@ -127,7 +131,7 @@ jobs:if: matrix.target == 'themes' && matrix.build_type == 'system'run: bin/rake themes:clone_all_official- - name: Add hosts to /etc/hosts, otherwise Chrome cannot reach minio+ - name: Add hosts to /etc/hosts, otherwise Chromium cannot reach minioif: matrix.build_type == 'system' && matrix.target == 'core'run: |echo "127.0.0.1 minio.local" | sudo tee -a /etc/hosts@@ -340,7 +344,7 @@ jobs:strategy:fail-fast: falsematrix:- browser: ["Chrome", "Firefox ESR", "Firefox Evergreen"]+ browser: ["Chromium", "Firefox ESR", "Firefox Evergreen"]env:TESTEM_BROWSER: ${{ (startsWith(matrix.browser, 'Firefox') && 'Firefox') || matrix.browser }}diff --git a/app/assets/javascripts/discourse/testem.js b/app/assets/javascripts/discourse/testem.jsindex 6329c325238..9120c468560 100644--- a/app/assets/javascripts/discourse/testem.js+++ b/app/assets/javascripts/discourse/testem.js@@ -127,12 +127,23 @@ class Reporter extends TapReporter {module.exports = {test_page: "tests/index.html?hidepassed",disable_watching: true,- launch_in_ci: ["Chrome"],- // launch_in_dev: ["Chrome"] // Ember-CLI always launches testem in 'CI' mode+ launch_in_ci: [process.env.TESTEM_DEFAULT_BROWSER || "Chrome"],tap_failed_tests_only: false,parallel: -1,browser_start_timeout: 120,browser_args: {+ Chromium: [+ // --no-sandbox is needed when running Chromium inside a container+ process.env.CI ? "--no-sandbox" : null,+ "--headless=new",+ "--disable-dev-shm-usage",+ "--disable-software-rasterizer",+ "--mute-audio",+ "--remote-debugging-port=4201",+ "--window-size=1440,900",+ "--enable-precise-memory-info",+ "--js-flags=--max_old_space_size=4096",+ ].filter(Boolean),Chrome: [// --no-sandbox is needed when running Chrome inside a containerprocess.env.CI ? "--no-sandbox" : null,