Skip to content

ci: update workflow to support only Node.js 22.x and 24.x #20

ci: update workflow to support only Node.js 22.x and 24.x

ci: update workflow to support only Node.js 22.x and 24.x #20

Workflow file for this run

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 lock file and node_modules to ensure clean install
rm -rf package-lock.json node_modules
npm cache clean --force
# Install dependencies with legacy peer deps
npm install --legacy-peer-deps --force
# Rebuild electron
npm rebuild electron
# Run npm install again to ensure everything is properly linked
npm install --legacy-peer-deps --force
- 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