name: Test on: push: branches: - main release: types: - published jobs: test: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '22.x' cache: 'yarn' - name: Install dependencies run: yarn install --frozen-lockfile - name: Install xvfb (Linux only) if: runner.os == 'Linux' run: sudo apt-get update && sudo apt-get install -y xvfb - name: Run Test with XVFB (Linux) if: runner.os == 'Linux' run: xvfb-run --auto-servernum yarn test - name: Run Test (Windows/macOS) if: runner.os != 'Linux' run: yarn test