|
| 1 | +name: Browser Tests |
| 2 | + |
| 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: 22.x |
| 16 | + |
| 17 | +jobs: |
| 18 | + build-and-test: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + name: | |
| 21 | + ${{ matrix.BROWSER }} | ${{ matrix.CONFIGS.name }} |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + BROWSER: [chrome, firefox] |
| 26 | + CONFIGS: |
| 27 | + - config: jtr-git.yml |
| 28 | + name: jQuery git |
| 29 | + - config: jtr-stable.yml |
| 30 | + name: jQuery stable |
| 31 | + |
| 32 | + steps: |
| 33 | + - name: Checkout |
| 34 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 35 | + |
| 36 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 37 | + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
| 38 | + with: |
| 39 | + node-version: ${{ env.NODE_VERSION }} |
| 40 | + cache: npm |
| 41 | + cache-dependency-path: '**/package-lock.json' |
| 42 | + |
| 43 | + - name: Install npm dependencies |
| 44 | + run: npm ci |
| 45 | + |
| 46 | + - name: Build |
| 47 | + run: npm run build |
| 48 | + |
| 49 | + - name: Test |
| 50 | + run: | |
| 51 | + npm run test:unit -- \ |
| 52 | + --headless -b ${{ matrix.BROWSER }} \ |
| 53 | + -c ${{ matrix.CONFIGS.config }} |
| 54 | +
|
| 55 | + edge: |
| 56 | + runs-on: windows-latest |
| 57 | + name: | |
| 58 | + edge | ${{ matrix.CONFIGS.name }} |
| 59 | + strategy: |
| 60 | + fail-fast: false |
| 61 | + matrix: |
| 62 | + CONFIGS: |
| 63 | + - config: jtr-git.yml |
| 64 | + name: jQuery git |
| 65 | + - config: jtr-stable.yml |
| 66 | + name: jQuery stable |
| 67 | + steps: |
| 68 | + - name: Checkout |
| 69 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 70 | + |
| 71 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 72 | + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
| 73 | + with: |
| 74 | + node-version: ${{ env.NODE_VERSION }} |
| 75 | + cache: npm |
| 76 | + cache-dependency-path: '**/package-lock.json' |
| 77 | + |
| 78 | + - name: Install dependencies |
| 79 | + run: npm ci |
| 80 | + |
| 81 | + - name: Build |
| 82 | + run: npm run build |
| 83 | + |
| 84 | + - name: Test |
| 85 | + run: npm run test:unit -- --headless -b edge -c ${{ matrix.CONFIGS.config }} |
| 86 | + |
| 87 | + safari: |
| 88 | + runs-on: macos-latest |
| 89 | + name: | |
| 90 | + safari | ${{ matrix.CONFIGS.name }} |
| 91 | + strategy: |
| 92 | + fail-fast: false |
| 93 | + matrix: |
| 94 | + CONFIGS: |
| 95 | + - config: jtr-git.yml |
| 96 | + name: jQuery git |
| 97 | + - config: jtr-stable.yml |
| 98 | + name: jQuery stable |
| 99 | + steps: |
| 100 | + - name: Checkout |
| 101 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 102 | + |
| 103 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 104 | + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
| 105 | + with: |
| 106 | + node-version: ${{ env.NODE_VERSION }} |
| 107 | + cache: npm |
| 108 | + cache-dependency-path: '**/package-lock.json' |
| 109 | + |
| 110 | + - name: Install dependencies |
| 111 | + run: npm ci |
| 112 | + |
| 113 | + - name: Build |
| 114 | + run: npm run build |
| 115 | + |
| 116 | + - name: Test |
| 117 | + run: npm run test:unit -- -b safari -c ${{ matrix.CONFIGS.config }} |
0 commit comments