Skip to content

Commit

Permalink
fix: Don't test v20 in CI on macOS (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish authored May 2, 2024
1 parent dd552c6 commit 5011cc6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/e2e-test-versions.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
const { readFileSync } = require('fs');

const versions = JSON.parse(readFileSync('./test/e2e/versions.json', 'utf8'));
let versions = JSON.parse(readFileSync('./test/e2e/versions.json', 'utf8'));

// Electron v20 exits immediately on macOS arch64 in GitHub Actions with SIGTRAP
if (process.env.CI && process.platform === 'darwin') {
versions = versions.filter((version) => !version.startsWith('20.'));
}

if (process.env.GITHUB_REF && process.env.GITHUB_REF.includes('release/')) {
// For release builds we test all versions
console.log(JSON.stringify(versions));
} else {
const versionCount = process.platform === 'darwin' ? -3 : -7;
// Otherwise we test the oldest version and the last 10 versions
// Otherwise we test the oldest supported version and the last 3 or 7 versions depending on the platform
console.log(JSON.stringify([versions[0], ...versions.slice(versionCount)]));
}

0 comments on commit 5011cc6

Please sign in to comment.