|
6 | 6 | branches-ignore: "dependabot/**" |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - build: |
| 9 | + build-and-test: |
10 | 10 | # Update it to `ubuntu-latest` only when: |
11 | 11 | # - our infra is on Debian >=13 which has ImageMagick 7 |
12 | 12 | # - `ubuntu-latest` resolves to v26.x which has ImageMagick 7 |
13 | 13 | # When doing that, also update the `convert` command to `magick`. |
14 | 14 | runs-on: ubuntu-24.04 |
| 15 | + name: ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) |
15 | 16 | strategy: |
16 | 17 | fail-fast: false |
17 | 18 | matrix: |
| 19 | + NAME: [ "test" ] |
| 20 | + NPM_SCRIPT: [ "qunit" ] |
| 21 | + |
18 | 22 | # Node.js 18 is required by jqueryui.com |
19 | 23 | # Remember to include the version used in Dockerfile! |
20 | 24 | NODE_VERSION: [18.x, 20.x, 22.x, 24.x] |
| 25 | + include: |
| 26 | + - NAME: "lint" |
| 27 | + NODE_VERSION: "24.x" |
| 28 | + NPM_SCRIPT: "lint" |
21 | 29 | steps: |
22 | 30 | - name: Checkout |
23 | 31 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
24 | 32 |
|
25 | 33 | - name: Update apt-get cache |
26 | 34 | run: sudo apt-get update |
| 35 | + if: "!contains(matrix.NPM_SCRIPT, 'lint')" |
27 | 36 |
|
28 | 37 | - name: Install xsltproc & ImageMagick 6 |
29 | 38 | run: sudo apt-get install -y xsltproc imagemagick |
| 39 | + if: "!contains(matrix.NPM_SCRIPT, 'lint')" |
30 | 40 |
|
31 | 41 | - name: Use Node.js ${{ matrix.NODE_VERSION }} |
32 | 42 | uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 |
|
38 | 48 | - name: Install dependencies |
39 | 49 | run: npm ci |
40 | 50 |
|
41 | | - - name: Prepare for tests |
42 | | - run: ./node_modules/.bin/grunt prepare |
| 51 | + - name: Build |
| 52 | + run: npm run build |
| 53 | + if: "!contains(matrix.NPM_SCRIPT, 'lint')" |
43 | 54 |
|
44 | 55 | - name: Run tests |
45 | | - run: npm test |
| 56 | + run: npm run ${{ matrix.NPM_SCRIPT }} |
0 commit comments