-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Don't test v20 in CI on macOS (#898)
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)])); | ||
} |