build: add several missing test steps for GHA (#42479)

This commit is contained in:
Shelley Vohr 2024-06-13 14:26:20 -05:00 committed by GitHub
parent 30885e5f9f
commit 0affad3be6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 162 additions and 18 deletions

View file

@ -90,16 +90,16 @@ async function main () {
env.LDFLAGS = ldflags;
}
const { status: buildStatus } = cp.spawnSync(NPX_CMD, ['node-gyp', 'rebuild', '--verbose', '--directory', 'test', '-j', 'max'], {
const { status: buildStatus, signal } = cp.spawnSync(NPX_CMD, ['node-gyp', 'rebuild', '--verbose', '--directory', 'test', '-j', 'max'], {
env,
cwd: NAN_DIR,
stdio: 'inherit',
shell: process.platform === 'win32'
});
if (buildStatus !== 0) {
if (buildStatus !== 0 || signal != null) {
console.error('Failed to build nan test modules');
return process.exit(buildStatus);
return process.exit(buildStatus !== 0 ? buildStatus : signal);
}
const { status: installStatus } = cp.spawnSync(NPX_CMD, [`yarn@${YARN_VERSION}`, 'install'], {
@ -108,9 +108,10 @@ async function main () {
stdio: 'inherit',
shell: process.platform === 'win32'
});
if (installStatus !== 0) {
if (installStatus !== 0 || signal != null) {
console.error('Failed to install nan node_modules');
return process.exit(installStatus);
return process.exit(installStatus !== 0 ? installStatus : signal);
}
const onlyTests = args.only && args.only.split(',');