Skip to content

Commit 06424ba

Browse files
committed
1 parent bf42d2b commit 06424ba

9 files changed

+34
-10609
lines changed

.github/workflows/CI.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
name: ${{ matrix.name }}
5252
runs-on: ${{ matrix.os }}
5353
env:
54-
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
54+
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
5555
FORCE_COLOR: "1"
5656
steps:
5757
- uses: actions/checkout@v4
@@ -62,14 +62,14 @@ jobs:
6262
path: |
6363
~/.npm
6464
${{ github.workspace }}/.puppeteer_download
65-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
65+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
6666

6767
- name: Use Node.js ${{ matrix.node }}
6868
uses: actions/setup-node@v4
6969
with:
7070
node-version: ${{ matrix.node }}
7171

72-
- run: npm ci
72+
- run: npm install
7373

7474
- name: Tests
7575
run: ${{ matrix.script }}
@@ -89,23 +89,23 @@ jobs:
8989
name: SpiderMonkey 68
9090
runs-on: ubuntu-20.04
9191
env:
92-
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
92+
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
9393
steps:
9494
- uses: actions/checkout@v4
9595
- uses: actions/cache@v4
9696
with:
9797
path: |
9898
~/.npm
9999
${{ github.workspace }}/.puppeteer_download
100-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
100+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
101101
- name: Use Node.js 18
102102
uses: actions/setup-node@v4
103103
with:
104104
node-version: 18.x
105105
- name: Install mozjs
106106
run: |
107107
sudo apt-fast install -y libmozjs-68-dev
108-
- run: npm ci
108+
- run: npm install
109109
- run: npm run build
110110
- name: Test mozjs.js
111111
run: js68 test/mozjs.js
@@ -127,23 +127,23 @@ jobs:
127127
name: SpiderMonkey 102
128128
runs-on: ubuntu-24.04
129129
env:
130-
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
130+
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
131131
steps:
132132
- uses: actions/checkout@v4
133133
- uses: actions/cache@v4
134134
with:
135135
path: |
136136
~/.npm
137137
${{ github.workspace }}/.puppeteer_download
138-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
138+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
139139
- name: Use Node.js 18
140140
uses: actions/setup-node@v4
141141
with:
142142
node-version: 18.x
143143
- name: Install mozjs
144144
run: |
145145
sudo apt-get install -y libmozjs-102-dev
146-
- run: npm ci
146+
- run: npm install
147147
- run: npm run build
148148
- name: Test mozjs.js
149149
run: js102 test/mozjs.js
@@ -165,23 +165,23 @@ jobs:
165165
name: SpiderMonkey 115
166166
runs-on: ubuntu-24.04
167167
env:
168-
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
168+
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
169169
steps:
170170
- uses: actions/checkout@v4
171171
- uses: actions/cache@v4
172172
with:
173173
path: |
174174
~/.npm
175175
${{ github.workspace }}/.puppeteer_download
176-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
176+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
177177
- name: Use Node.js 18
178178
uses: actions/setup-node@v4
179179
with:
180180
node-version: 18.x
181181
- name: Install mozjs
182182
run: |
183183
sudo apt-get install -y libmozjs-115-dev
184-
- run: npm ci
184+
- run: npm install
185185
- run: npm run build
186186
- name: Test mozjs.js
187187
run: js115 test/mozjs.js

.github/workflows/browsers-full.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
1818
runs-on: ubuntu-latest
1919
env:
20-
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
20+
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
2121
steps:
2222
- uses: actions/checkout@v4
2323

@@ -26,7 +26,7 @@ jobs:
2626
path: |
2727
~/.npm
2828
${{ github.workspace }}/.puppeteer_download
29-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
29+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
3030

3131
- name: Use Node.js 18
3232
uses: actions/setup-node@v4
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Prepare
3737
run: |
38-
npm ci
38+
npm install
3939
npm run build
4040
4141
- name: Tests

.github/workflows/browsers-quick.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
99
runs-on: ubuntu-latest
1010
env:
11-
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
11+
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
1212
steps:
1313
- uses: actions/checkout@v4
1414

@@ -17,7 +17,7 @@ jobs:
1717
path: |
1818
~/.npm
1919
${{ github.workspace }}/.puppeteer_download
20-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
20+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
2121

2222
- name: Use Node.js 18
2323
uses: actions/setup-node@v4
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Prepare
2828
run: |
29-
npm ci
29+
npm install
3030
npm run build
3131
3232
# To debug locally:

.github/workflows/coverage.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
99
runs-on: ubuntu-20.04
1010
env:
11-
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
11+
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
1212
steps:
1313
- uses: actions/checkout@v4
1414

@@ -17,14 +17,14 @@ jobs:
1717
path: |
1818
~/.npm
1919
${{ github.workspace }}/.puppeteer_download
20-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
20+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
2121

2222
- name: Use Node.js 18
2323
uses: actions/setup-node@v4
2424
with:
2525
node-version: 18.x
2626

27-
- run: npm ci
27+
- run: npm install
2828

2929
- name: Tests
3030
run: npm run coverage

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
/qunit/
1414
/temp/
1515
/.eslintcache
16+
/package-lock.json

build/reproducible-builds.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async function buildRelease (version, cacheDir = null) {
5454
npm_config_update_notifier: 'false',
5555
PATH: process.env.PATH,
5656
QUNIT_BUILD_RELEASE: '1',
57-
PUPPETEER_DOWNLOAD_PATH: path.join(cacheDir, 'puppeteer_download')
57+
PUPPETEER_CACHE_DIR: path.join(cacheDir, 'puppeteer_download')
5858
};
5959
// Use sync for npm-ci to avoid concurrency bugs with shared cache
6060
cp.execFileSync('npm', ['ci'], {

demos/bundlers.mjs

+10-6
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,14 @@ Testing http://localhost:8000/tmp/test-require-sub.webpack.html .OK
152152
153153
Done.`;
154154

155-
const actual = cp.execSync('node_modules/.bin/grunt test', {
156-
cwd: DIR,
157-
env: { PATH: process.env.PATH },
158-
encoding: 'utf8'
159-
});
160-
assert.equal(normalize(actual).trim(), expected);
155+
try {
156+
// This will use env CI, CHROMIUM_FLAGS, and PUPPETEER_CACHE_DIR
157+
const actual = cp.execSync('node_modules/.bin/grunt test', {
158+
cwd: DIR,
159+
encoding: 'utf8'
160+
});
161+
assert.equal(normalize(actual).trim(), expected);
162+
} catch (e) {
163+
assert.equal(e.stdout || e.stderr, '', 'error');
164+
}
161165
});

demos/grunt-contrib-qunit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ QUnit.test.each('failing tests', {
3333
>> at file:fail-uncaught.html:16`]
3434
}, (assert, [command, expected]) => {
3535
try {
36-
// This will use env CI, CHROMIUM_FLAGS, and PUPPETEER_DOWNLOAD_PATH
36+
// This will use env CI, CHROMIUM_FLAGS, and PUPPETEER_CACHE_DIR
3737
const ret = cp.execSync('node_modules/.bin/grunt qunit:' + command, {
3838
cwd: DIR,
3939
encoding: 'utf8'

0 commit comments

Comments
 (0)