|
1 |
| -name: CI |
| 1 | +name: Node |
2 | 2 |
|
3 |
| -on: [push, pull_request] |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches-ignore: "dependabot/**" |
| 7 | + # Once a week every Monday |
| 8 | + schedule: |
| 9 | + - cron: "42 1 * * 1" |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +env: |
| 15 | + NODE_VERSION: 20.x |
4 | 16 |
|
5 | 17 | jobs:
|
6 |
| - build: |
| 18 | + build-and-test: |
7 | 19 | runs-on: ubuntu-latest
|
| 20 | + name: ${{ matrix.BROWSER }} |
8 | 21 | strategy:
|
9 | 22 | fail-fast: false
|
10 | 23 | matrix:
|
11 |
| - # Node.js 10 is required by jQuery infra |
12 |
| - NODE_VERSION: [10.x, 18.x] |
13 |
| - NPM_SCRIPT: ["ci"] |
14 |
| - include: |
15 |
| - - NAME: "Browser tests" |
16 |
| - NODE_VERSION: "18.x" |
17 |
| - NPM_SCRIPT: "browserstack" |
| 24 | + BROWSER: [chrome, firefox] |
| 25 | + |
| 26 | + steps: |
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 29 | + |
| 30 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 31 | + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
| 32 | + with: |
| 33 | + node-version: ${{ env.NODE_VERSION }} |
| 34 | + |
| 35 | + - name: Cache |
| 36 | + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
| 37 | + with: |
| 38 | + path: ~/.npm |
| 39 | + key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} |
| 40 | + restore-keys: | |
| 41 | + ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- |
| 42 | +
|
| 43 | + - name: Install npm dependencies |
| 44 | + run: npm install |
| 45 | + |
| 46 | + - name: Build |
| 47 | + run: npm run build |
| 48 | + |
| 49 | + - name: Test |
| 50 | + run: | |
| 51 | + npm run test:unit -- -h -b ${{ matrix.BROWSER }} \ |
| 52 | + --jquery 1.8.3 --jquery 1.9.1 --jquery 1.10.2 --jquery 1.11.3 --jquery 1.12.4 \ |
| 53 | + --jquery 2.0.3 --jquery 2.1.4 --jquery 2.2.4 \ |
| 54 | + --jquery 3.0.0 --jquery 3.1.1 --jquery 3.2.1 --jquery 3.3.1 \ |
| 55 | + --jquery 3.4.1 --jquery 3.5.1 --jquery 3.6.4 --jquery 3.7.1 \ |
| 56 | + --jquery 3.x-git --jquery git \ |
| 57 | + --retries 3 --hard-retries 1 |
| 58 | +
|
| 59 | + edge: |
| 60 | + runs-on: windows-latest |
| 61 | + name: edge |
| 62 | + steps: |
| 63 | + - name: Checkout |
| 64 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 65 | + |
| 66 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 67 | + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
| 68 | + with: |
| 69 | + node-version: ${{ env.NODE_VERSION }} |
| 70 | + |
| 71 | + - name: Cache |
| 72 | + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
| 73 | + with: |
| 74 | + path: ~/.npm |
| 75 | + key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} |
| 76 | + restore-keys: | |
| 77 | + ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- |
| 78 | +
|
| 79 | + - name: Install dependencies |
| 80 | + run: npm install |
| 81 | + |
| 82 | + - name: Build |
| 83 | + run: npm run build |
| 84 | + |
| 85 | + - name: Test |
| 86 | + run: | |
| 87 | + npm run test:unit -- -h -b edge ` |
| 88 | + --jquery 1.8.3 --jquery 1.9.1 --jquery 1.10.2 --jquery 1.11.3 --jquery 1.12.4 ` |
| 89 | + --jquery 2.0.3 --jquery 2.1.4 --jquery 2.2.4 ` |
| 90 | + --jquery 3.0.0 --jquery 3.1.1 --jquery 3.2.1 --jquery 3.3.1 ` |
| 91 | + --jquery 3.4.1 --jquery 3.5.1 --jquery 3.6.4 --jquery 3.7.1 ` |
| 92 | + --jquery 3.x-git --jquery git ` |
| 93 | + --retries 3 --hard-retries 1 |
| 94 | +
|
| 95 | + safari: |
| 96 | + runs-on: macos-latest |
| 97 | + name: safari |
18 | 98 | steps:
|
19 |
| - - name: Checkout |
20 |
| - uses: actions/checkout@v2 |
21 |
| - |
22 |
| - - name: Cache |
23 |
| - uses: actions/cache@v2 |
24 |
| - with: |
25 |
| - path: ~/.npm |
26 |
| - key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} |
27 |
| - restore-keys: | |
28 |
| - ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock- |
29 |
| -
|
30 |
| - - name: Use Node.js ${{ matrix.NODE_VERSION }} |
31 |
| - uses: actions/setup-node@v2.1.2 |
32 |
| - with: |
33 |
| - node-version: ${{ matrix.NODE_VERSION }} |
34 |
| - |
35 |
| - - name: Install dependencies |
36 |
| - run: | |
37 |
| - npm install |
38 |
| -
|
39 |
| - - name: Run tests |
40 |
| - env: |
41 |
| - BROWSER_STACK_USERNAME: ${{ secrets.BROWSER_STACK_USERNAME }} |
42 |
| - BROWSER_STACK_ACCESS_KEY: ${{ secrets.BROWSER_STACK_ACCESS_KEY }} |
43 |
| - run: | |
44 |
| - export PATH=${HOME}/firefox:$PATH |
45 |
| - npm run ${{ matrix.NPM_SCRIPT }} |
| 99 | + - name: Checkout |
| 100 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 101 | + |
| 102 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 103 | + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
| 104 | + with: |
| 105 | + node-version: ${{ env.NODE_VERSION }} |
| 106 | + |
| 107 | + - name: Cache |
| 108 | + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
| 109 | + with: |
| 110 | + path: ~/.npm |
| 111 | + key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} |
| 112 | + restore-keys: | |
| 113 | + ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- |
| 114 | +
|
| 115 | + - name: Install dependencies |
| 116 | + run: npm install |
| 117 | + |
| 118 | + - name: Build |
| 119 | + run: npm run build |
| 120 | + |
| 121 | + - name: Test |
| 122 | + run: | |
| 123 | + npm run test:unit -- -b safari \ |
| 124 | + --jquery 1.8.3 --jquery 1.9.1 --jquery 1.10.2 --jquery 1.11.3 --jquery 1.12.4 \ |
| 125 | + --jquery 2.0.3 --jquery 2.1.4 --jquery 2.2.4 \ |
| 126 | + --jquery 3.0.0 --jquery 3.1.1 --jquery 3.2.1 --jquery 3.3.1 \ |
| 127 | + --jquery 3.4.1 --jquery 3.5.1 --jquery 3.6.4 --jquery 3.7.1 \ |
| 128 | + --jquery 3.x-git --jquery git \ |
| 129 | + --retries 3 --hard-retries 1 |
0 commit comments