Skip to content

Commit

Permalink
fix(cli): created template missing macOS testing (#1659)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jul 18, 2023
1 parent 6d62b3f commit 4e0c9b1
Show file tree
Hide file tree
Showing 2 changed files with 330 additions and 325 deletions.
10 changes: 8 additions & 2 deletions cli/src/api/templates/ci.yml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@ export const createGithubActionsCIYml = (
if (!enableWindowsX86 && !enableMacOSX86) {
delete fullTemplate.jobs[TEST_MACOS_WINDOWS]
} else {
const filterTarget = enableWindowsX86 ? 'macos-latest' : 'windows-latest'
const filterTargets = new Set<string>()
if (enableWindowsX86) {
filterTargets.add('windows-latest')
}
if (enableMacOSUni || enableMacOSX86) {
filterTargets.add('macos-latest')
}
fullTemplate.jobs[TEST_MACOS_WINDOWS].strategy.matrix.settings =
fullTemplate.jobs[TEST_MACOS_WINDOWS].strategy.matrix.settings.filter(
({ host }: { host: string; target: string }) => host !== filterTarget,
({ host }: { host: string; target: string }) => filterTargets.has(host),
)

requiredSteps.push(TEST_MACOS_WINDOWS)
Expand Down

0 comments on commit 4e0c9b1

Please sign in to comment.