ci: update workflow to support only Node.js 22.x and 24.x #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
fail-fast: false # Continue with other versions if one fails | |
# Note: Node.js 24.x will be added once it's officially released | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: | | |
# Remove existing lock file and clear cache | |
rm -f package-lock.json | |
npm cache clean --force | |
# Install dependencies with legacy peer deps to handle ESLint plugin conflicts | |
npm install --legacy-peer-deps | |
# Ensure electron is properly installed for the tests | |
npm rebuild electron | |
- name: Format check | |
run: npm run format:check || true | |
- name: Lint | |
run: npm run lint || true | |
- name: Build | |
run: npm run react-build | |
- name: Install Chrome | |
uses: browser-actions/setup-chrome@latest | |
with: | |
chrome-version: stable | |
- name: Start application and run E2E tests | |
env: | |
TEST: 'true' | |
CI: 'true' | |
DISPLAY: ':99' | |
run: | | |
# Start Xvfb | |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | |
sleep 5 | |
# Run the tests with increased timeout and debugging | |
DEBUG=wdio* WDIO_LOG_LEVEL=debug npm test | |
- name: Upload test artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-artifacts | |
path: | | |
tests/e2e/logs/** | |
tests/e2e/screenshots/** | |
tests/e2e/videos/** | |
wdio-logs/** | |
if-no-files-found: ignore |