From efcf81a73807c7f821e7656fb31c7ea981875af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Fri, 12 Sep 2025 14:45:58 +0200 Subject: [PATCH 1/2] Build: Really test on Firefox ESR, new & old The previous config declared Firefox ESR testing, but the tests were never run due to clashing names with main Firefox test runs. Apart from fixing that, backport jquery/jquery#5682 so that both Firefox ESR versions can be downloaded despite using different compression algorithms. Ref gh-598 Ref jquery/jquery#5682 --- .github/workflows/browser-tests.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/browser-tests.yml b/.github/workflows/browser-tests.yml index 84465d55..d0c352c8 100644 --- a/.github/workflows/browser-tests.yml +++ b/.github/workflows/browser-tests.yml @@ -12,14 +12,15 @@ env: jobs: test: runs-on: ubuntu-latest - name: ${{ matrix.BROWSER }} (${{ matrix.MIGRATE_VERSION }} Migrate) + name: ${{ matrix.NAME || matrix.BROWSER }} (${{ matrix.MIGRATE_VERSION }} Migrate) strategy: fail-fast: false matrix: + NAME: [""] BROWSER: ["chrome", "firefox"] MIGRATE_VERSION: ["min"] include: - - NAME: "Node" + - NAME: "" BROWSER: "chrome" MIGRATE_VERSION: "esmodules" - NAME: "Firefox ESR (new)" @@ -57,7 +58,13 @@ jobs: - name: Install Firefox ESR run: | - wget --no-verbose $FIREFOX_SOURCE_URL -O - | tar -jx -C ${HOME} + # Support: Firefox <135 only + # Older Firefox used to be compressed using bzip2, newer using xz. Try + # to uncompress using xz, fall back to bzip2 if that fails. + # Note: this will download the old Firefox ESR twice, but it will still work + # when the current ESR version starts to use xz with no changes to the code. + wget --no-verbose "$FIREFOX_SOURCE_URL" -O - | tar -Jx -C "$HOME" || \ + wget --no-verbose "$FIREFOX_SOURCE_URL" -O - | tar -jx -C "$HOME" echo "PATH=${HOME}/firefox:$PATH" >> "$GITHUB_ENV" echo "FIREFOX_BIN=${HOME}/firefox/firefox" >> "$GITHUB_ENV" if: contains(matrix.NAME, 'Firefox ESR') From d51106c7f23d69d0490aebae7449433cf3bd53ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Fri, 12 Sep 2025 16:19:05 +0200 Subject: [PATCH 2/2] Build: Simplify caching in CI Our setup is pretty standard, so manual configuration of `actions/cache` is an overkill. Relying on built-in `actions/node` caching will also resolve differences between caching configurations for macOS/Linux vs. Windows. --- .github/workflows/browser-tests.yml | 30 ++++++----------------------- .github/workflows/browserstack.yml | 10 ++-------- .github/workflows/filestash.yml | 10 ++-------- .github/workflows/node.js.yml | 10 ++-------- 4 files changed, 12 insertions(+), 48 deletions(-) diff --git a/.github/workflows/browser-tests.yml b/.github/workflows/browser-tests.yml index d0c352c8..866c0f79 100644 --- a/.github/workflows/browser-tests.yml +++ b/.github/workflows/browser-tests.yml @@ -37,14 +37,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ env.NODE_VERSION }} - - - name: Cache - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- + cache: npm + cache-dependency-path: '**/package-lock.json' - name: Set download URL for Firefox ESR (old) run: | @@ -92,14 +86,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ env.NODE_VERSION }} - - - name: Cache - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- + cache: npm + cache-dependency-path: '**/package-lock.json' - name: Install dependencies run: npm install @@ -121,14 +109,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ env.NODE_VERSION }} - - - name: Cache - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- + cache: npm + cache-dependency-path: '**/package-lock.json' - name: Install dependencies run: npm install diff --git a/.github/workflows/browserstack.yml b/.github/workflows/browserstack.yml index 03bb254e..d2010e66 100644 --- a/.github/workflows/browserstack.yml +++ b/.github/workflows/browserstack.yml @@ -51,14 +51,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ env.NODE_VERSION }} - - - name: Cache - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- + cache: npm + cache-dependency-path: '**/package-lock.json' - name: Install dependencies run: npm install diff --git a/.github/workflows/filestash.yml b/.github/workflows/filestash.yml index 02360ac0..e520e3d9 100644 --- a/.github/workflows/filestash.yml +++ b/.github/workflows/filestash.yml @@ -23,14 +23,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ env.NODE_VERSION }} - - - name: Cache - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock- + cache: npm + cache-dependency-path: '**/package-lock.json' - name: Install dependencies run: npm install diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4bcb7263..ec2c8740 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,14 +27,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ matrix.NODE_VERSION }} - - - name: Cache - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock- + cache: npm + cache-dependency-path: '**/package-lock.json' - name: Install dependencies run: npm install