jQuery 4 compatibility #328
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: Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: # Allow manual workflow execution | |
| # Allow only one running workflow per branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test (Node.js ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false # Test all Node versions even if one fails | |
| matrix: | |
| node-version: [lts/*, current] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| # For better coverage reports | |
| fetch-depth: 0 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci --prefer-offline --no-audit | |
| - name: Analyze JavaScript files | |
| run: npm run-script lint | |
| - name: Run test suite | |
| run: npm test | |
| - name: Generate coverage report | |
| run: npm run-script coverage | |
| - name: Upload coverage report to Coveralls | |
| if: matrix.node-version == 'lts/*' # Only upload once | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: ./coverage/lcov.info | |
| jquery-compatibility: | |
| name: jQuery Compatibility Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| jquery-version: ['3.7.1', '4.0.0'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci --prefer-offline --no-audit | |
| - name: Install jQuery ${{ matrix.jquery-version }} | |
| run: npm install jquery@${{ matrix.jquery-version }} | |
| - name: Run test suite with jQuery ${{ matrix.jquery-version }} | |
| run: npm test |