Run the browser tests against every supported jQuery line #6
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| jobs: | |
| unit: | |
| name: unit (node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [22, 24] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm test | |
| browser: | |
| name: browser (${{ matrix.id }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { id: '3.7.1', jquery: 'jquery-3.7.1', slim: '0', projects: '' } | |
| - { id: '3.7.1-min', jquery: 'jquery-3.7.1', slim: '0', projects: '--project=chromium', min: '1' } | |
| - { id: '1.8.3', jquery: 'vendor/jquery-1.8.3.js', slim: '0', projects: '--project=chromium' } | |
| - { id: '4.0.0-slim', jquery: 'jquery-4.0.0', slim: '1', projects: '--project=chromium' } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - id: pw | |
| run: echo "version=$(node -e 'console.log(require("@playwright/test/package.json").version)')" >> "$GITHUB_OUTPUT" | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ steps.pw.outputs.version }} | |
| - run: npx playwright install --with-deps | |
| - run: npx playwright test ${{ matrix.projects }} | |
| env: | |
| IRS_JQUERY: ${{ matrix.jquery }} | |
| IRS_SLIM: ${{ matrix.slim }} | |
| IRS_MIN: ${{ matrix.min || '0' }} | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report-${{ matrix.id }} | |
| path: playwright-report | |
| dist: | |
| name: committed dist is up to date | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build | |
| - run: git diff --exit-code -- js css |