|
| 1 | +name: Browser Tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + |
| 9 | +env: |
| 10 | + NODE_VERSION: 20.x |
| 11 | + |
| 12 | +jobs: |
| 13 | + test: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + name: ${{ matrix.BROWSER }} (${{ matrix.MIGRATE_VERSION }} Migrate) |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + BROWSER: ["chrome", "firefox"] |
| 20 | + MIGRATE_VERSION: ["min"] |
| 21 | + include: |
| 22 | + - NAME: "Node" |
| 23 | + BROWSER: "chrome" |
| 24 | + MIGRATE_VERSION: "esmodules" |
| 25 | + steps: |
| 26 | + - name: Checkout |
| 27 | + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 |
| 28 | + |
| 29 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 30 | + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 |
| 31 | + with: |
| 32 | + node-version: ${{ env.NODE_VERSION }} |
| 33 | + |
| 34 | + - name: Cache |
| 35 | + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
| 36 | + with: |
| 37 | + path: ~/.npm |
| 38 | + key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} |
| 39 | + restore-keys: | |
| 40 | + ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- |
| 41 | +
|
| 42 | + - name: Install dependencies |
| 43 | + run: npm install |
| 44 | + |
| 45 | + - name: Run tests |
| 46 | + run: | |
| 47 | + npm run pretest |
| 48 | + npm run test:unit -- -b ${{ matrix.BROWSER }} -h \ |
| 49 | + --jquery-migrate ${{ matrix.MIGRATE_VERSION }} \ |
| 50 | + --jquery git --jquery git.min --jquery git.slim --jquery git.slim.min \ |
| 51 | + --jquery 3.x-git --jquery 3.x-git.min --jquery 3.x-git.slim --jquery 3.x-git.slim.min \ |
| 52 | + --jquery 3.7.1 --jquery 3.7.1.slim \ |
| 53 | + --jquery 3.6.4 --jquery 3.5.1 --jquery 3.4.1 \ |
| 54 | + --jquery 3.3.1 --jquery 3.2.1 --jquery 3.1.1 --jquery 3.0.0 \ |
| 55 | + --retries 1 |
| 56 | +
|
| 57 | + ie: |
| 58 | + runs-on: windows-latest |
| 59 | + name: Edge in IE mode (min Migrate) |
| 60 | + env: |
| 61 | + MIGRATE_VERSION: "min" |
| 62 | + steps: |
| 63 | + - name: Checkout |
| 64 | + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 |
| 65 | + |
| 66 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 67 | + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 |
| 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: Run tests |
| 83 | + shell: cmd |
| 84 | + run: | |
| 85 | + npm run test:ie -- ^ |
| 86 | + --jquery-migrate ${{ env.MIGRATE_VERSION }} ^ |
| 87 | + --jquery git --jquery git.min --jquery git.slim --jquery git.slim.min ^ |
| 88 | + --jquery 3.x-git --jquery 3.x-git.min --jquery 3.x-git.slim --jquery 3.x-git.slim.min ^ |
| 89 | + --jquery 3.7.1 --jquery 3.7.1.slim ^ |
| 90 | + --jquery 3.6.4 --jquery 3.5.1 --jquery 3.4.1 ^ |
| 91 | + --jquery 3.3.1 --jquery 3.2.1 --jquery 3.1.1 --jquery 3.0.0 ^ |
| 92 | + --retries 1 |
| 93 | +
|
| 94 | + safari: |
| 95 | + runs-on: macos-latest |
| 96 | + name: Safari (min Migrate) |
| 97 | + env: |
| 98 | + MIGRATE_VERSION: "min" |
| 99 | + steps: |
| 100 | + - name: Checkout |
| 101 | + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 |
| 102 | + |
| 103 | + - name: Use Node.js ${{ env.NODE_VERSION }} |
| 104 | + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 |
| 105 | + with: |
| 106 | + node-version: ${{ env.NODE_VERSION }} |
| 107 | + |
| 108 | + - name: Cache |
| 109 | + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
| 110 | + with: |
| 111 | + path: ~/.npm |
| 112 | + key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} |
| 113 | + restore-keys: | |
| 114 | + ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- |
| 115 | +
|
| 116 | + - name: Install dependencies |
| 117 | + run: npm install |
| 118 | + |
| 119 | + - name: Run tests |
| 120 | + run: | |
| 121 | + npm run test:safari -- \ |
| 122 | + --jquery-migrate ${{ env.MIGRATE_VERSION }} \ |
| 123 | + --jquery git --jquery git.min --jquery git.slim --jquery git.slim.min \ |
| 124 | + --jquery 3.x-git --jquery 3.x-git.min --jquery 3.x-git.slim --jquery 3.x-git.slim.min \ |
| 125 | + --jquery 3.7.1 --jquery 3.7.1.slim \ |
| 126 | + --jquery 3.6.4 --jquery 3.5.1 --jquery 3.4.1 \ |
| 127 | + --jquery 3.3.1 --jquery 3.2.1 --jquery 3.1.1 --jquery 3.0.0 \ |
| 128 | + --retries 1 |
0 commit comments