Skip to content

Commit 98ac664

Browse files
authored
Build: Really test on Firefox ESR, new & old; simplify cache
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. Also, 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. Closes gh-598 Ref gh-597 Ref jquery/jquery#5682
1 parent 9da31c3 commit 98ac664

File tree

4 files changed

+22
-51
lines changed

4 files changed

+22
-51
lines changed

.github/workflows/browser-tests.yml

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ env:
1212
jobs:
1313
test:
1414
runs-on: ubuntu-latest
15-
name: ${{ matrix.BROWSER }} (${{ matrix.MIGRATE_VERSION }} Migrate)
15+
name: ${{ matrix.NAME || matrix.BROWSER }} (${{ matrix.MIGRATE_VERSION }} Migrate)
1616
strategy:
1717
fail-fast: false
1818
matrix:
19+
NAME: [""]
1920
BROWSER: ["chrome", "firefox"]
2021
MIGRATE_VERSION: ["min"]
2122
include:
22-
- NAME: "Node"
23+
- NAME: ""
2324
BROWSER: "chrome"
2425
MIGRATE_VERSION: "esmodules"
2526
- NAME: "Firefox ESR (new)"
@@ -36,14 +37,8 @@ jobs:
3637
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3738
with:
3839
node-version: ${{ env.NODE_VERSION }}
39-
40-
- name: Cache
41-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
42-
with:
43-
path: ~/.npm
44-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
45-
restore-keys: |
46-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
40+
cache: npm
41+
cache-dependency-path: '**/package-lock.json'
4742

4843
- name: Set download URL for Firefox ESR (old)
4944
run: |
@@ -57,7 +52,13 @@ jobs:
5752

5853
- name: Install Firefox ESR
5954
run: |
60-
wget --no-verbose $FIREFOX_SOURCE_URL -O - | tar -jx -C ${HOME}
55+
# Support: Firefox <135 only
56+
# Older Firefox used to be compressed using bzip2, newer using xz. Try
57+
# to uncompress using xz, fall back to bzip2 if that fails.
58+
# Note: this will download the old Firefox ESR twice, but it will still work
59+
# when the current ESR version starts to use xz with no changes to the code.
60+
wget --no-verbose "$FIREFOX_SOURCE_URL" -O - | tar -Jx -C "$HOME" || \
61+
wget --no-verbose "$FIREFOX_SOURCE_URL" -O - | tar -jx -C "$HOME"
6162
echo "PATH=${HOME}/firefox:$PATH" >> "$GITHUB_ENV"
6263
echo "FIREFOX_BIN=${HOME}/firefox/firefox" >> "$GITHUB_ENV"
6364
if: contains(matrix.NAME, 'Firefox ESR')
@@ -84,14 +85,8 @@ jobs:
8485
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
8586
with:
8687
node-version: ${{ env.NODE_VERSION }}
87-
88-
- name: Cache
89-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
90-
with:
91-
path: ~/.npm
92-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
93-
restore-keys: |
94-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
88+
cache: npm
89+
cache-dependency-path: '**/package-lock.json'
9590

9691
- name: Install dependencies
9792
run: npm install
@@ -113,14 +108,8 @@ jobs:
113108
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
114109
with:
115110
node-version: ${{ env.NODE_VERSION }}
116-
117-
- name: Cache
118-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
119-
with:
120-
path: ~/.npm
121-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
122-
restore-keys: |
123-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
111+
cache: npm
112+
cache-dependency-path: '**/package-lock.json'
124113

125114
- name: Install dependencies
126115
run: npm install

.github/workflows/browserstack.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,8 @@ jobs:
7878
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
7979
with:
8080
node-version: ${{ env.NODE_VERSION }}
81-
82-
- name: Cache
83-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
84-
with:
85-
path: ~/.npm
86-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
87-
restore-keys: |
88-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
81+
cache: npm
82+
cache-dependency-path: '**/package-lock.json'
8983

9084
- name: Install dependencies
9185
run: npm install

.github/workflows/filestash.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,8 @@ jobs:
2323
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2424
with:
2525
node-version: ${{ env.NODE_VERSION }}
26-
27-
- name: Cache
28-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
29-
with:
30-
path: ~/.npm
31-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
32-
restore-keys: |
33-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
26+
cache: npm
27+
cache-dependency-path: '**/package-lock.json'
3428

3529
- name: Install dependencies
3630
run: npm install

.github/workflows/node.js.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,8 @@ jobs:
2020
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2121
with:
2222
node-version: ${{ env.NODE_VERSION }}
23-
24-
- name: Cache
25-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
26-
with:
27-
path: ~/.npm
28-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
29-
restore-keys: |
30-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
23+
cache: npm
24+
cache-dependency-path: '**/package-lock.json'
3125

3226
- name: Install dependencies
3327
run: npm install

0 commit comments

Comments
 (0)