Skip to content

Commit

Permalink
Fix browser matrix in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
surilindur committed Nov 26, 2024
1 parent 421700e commit 2d1b762
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ jobs:
- 18.x
- 20.x
- 22.x
runs-on: ubuntu-latest
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Ensure line endings are consistent
run: git config --global core.autocrlf input
Expand Down Expand Up @@ -127,10 +129,11 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version:
- 18.x
- 20.x
- 22.x
browser:
- Chrome
- Firefox
# TODO: uncomment after the Webkit stuff has been sorted out in Karma
# - Webkit
runs-on: ubuntu-latest
steps:
- name: Ensure line endings are consistent
Expand All @@ -148,13 +151,20 @@ jobs:
**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- name: Install dependencies and build
run: yarn install --frozen-lockfile --ignore-engines
run: yarn install --frozen-lockfile
- name: Install ${{ matrix.browser }} via Playwright
if: startsWith(matrix.browser, 'Webkit')
# The @L will convert 'Webkit' into lowercase 'webkit' which is the name Playwright expects.
run: yarn playwright install --with-deps ${BROWSER_NAME@L}
env:
BROWSER_NAME: ${{ matrix.browser }}
- name: Run browser tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 3
timeout_minutes: 2
max_attempts: 3
command: yarn run test-browser
# The tests will run on 'WebkitHeadless', 'FirefoxHeadless' and 'ChromeHeadless'
command: yarn run test:browser --browsers ${{ matrix.browser }}Headless

coveralls:
name: Coverage check
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "yarn run test:unit && yarn run test:system -i packages/",
"test-ci:unit": "jest packages/ --ci --maxWorkers=4 --coverage",
"test-ci:system": "jest engines/ --ci --maxWorkers=4 --coverage=false",
"test-browser": "karma start karma.config.js --single-run",
"test:browser": "karma start karma.config.js --single-run",
"lint": "eslint . --cache",
"lint-fix": "eslint . --fix",
"clean": "tsc --build --clean && rm -rf ./node_modules && rm -rf ./packages/*/node_modules",
Expand Down

0 comments on commit 2d1b762

Please sign in to comment.