Compare commits

..
Author SHA1 Message Date
gronod d2466d9a66 Merge pull request 'test(m2): mock CUPS so Print All enables on GitHub macos-14' (!176) from fix/m2-print-all-mock-cups into develop
macOS CI / build-and-test (push) Waiting to run
macOS CI / package (push) Blocked by required conditions
Reviewed-on: #176
2026-09-14 17:35:39 +01:00
gronod 4af2d96294 test(m2): mock CUPS so Print All enables on GitHub macos-14
macOS CI / build-and-test (pull_request) Waiting to run
macOS CI / package (pull_request) Blocked by required conditions
macOS CI / build-and-test (push) Skipped
testPrinttargFixtureGalleryAndStubbedPrint asserted btnPrintAll
immediately after the gallery appeared, without ICCERY_CUPS_BIN_DIR.
Gitea Monterey has system queues; GitHub macos-14-arm64 does not, so
selectedPrinter stays empty and the button stays disabled (run
34867767434). Point M2 at Fixtures/bin like M3, and wait for enable.
2026-09-14 16:32:57 +00:00
gronod d17aa962ce Merge pull request 'fix(ci): pin GitHub Actions to macos-14 and clamp the window on-screen' (#175) from fix/gh-ci-window-and-runner into develop
macOS CI / build-and-test (push) Waiting to run
macOS CI / package (push) Blocked by required conditions
Reviewed-on: #175
2026-09-14 17:18:13 +01:00
gronod 93acd32b51 fix(ci): pin GitHub Actions to macos-14 and keep the window on-screen
macOS CI / build-and-test (push) Skipped
macOS CI / build-and-test (pull_request) Waiting to run
macOS CI / package (pull_request) Blocked by required conditions
macos-latest is macos-26-arm64 (run 34864198118). A 1280x800 window
centered on that display hangs off the left edge, so XCTest sees
sidebar controls at x ≈ -116 and refuses the click. Pin the GitHub
workflow to macos-14 and clamp the main window to visibleFrame.
2026-09-14 16:17:20 +00:00
gronod 67cf452e59 Update .github/workflows/macos.yml
macOS CI / build-and-test (push) Waiting to run
macOS CI / package (push) Blocked by required conditions
2026-09-14 16:44:50 +01:00
gronod 83ed53c7fc Merge pull request 'ci: GitHub Actions twin of the Gitea macOS workflow' (#174) from ci/github-workflows into develop
macOS CI / package (push) Blocked by required conditions
macOS CI / build-and-test (push) In progress
Reviewed-on: #174
2026-09-14 16:42:01 +01:00
3 changed files with 44 additions and 9 deletions
+5 -3
View File
@@ -1,7 +1,9 @@
# GitHub Actions twin of .gitea/workflows/macos.yml.
# Deltas from the Gitea file (everything else is the same jobs/steps):
# - runs-on macos-14: github.com retired macos-12 (the Gitea runner label).
# The Gitea workflow already notes macos-14 works for this pipeline.
# - runs-on macos-14: github.com retired macos-12. Do not use
# macos-latest — in 2026 that is macos-26-arm64, where a 1280×800
# window hangs off the virtual display and XCTest marks sidebar
# controls (x ≈ -116) as not hittable (run 34864198118).
# - actions/upload-artifact@v4: v3 is shut down on github.com. Gitea act_runner
# still uses v3.
# - No NODE_EXTRA_CA_CERTS / System keychain bundle: that is only for the
@@ -25,7 +27,7 @@ permissions:
jobs:
build-and-test:
runs-on: macos-26-intel
runs-on: macos-14
env:
DERIVED: build/DerivedData-test
steps:
+33 -2
View File
@@ -56,10 +56,41 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
}
/// docs/21 §Shell: 1280×800 content, min 1100×700, centred.
/// GitHub-hosted Macs (and any display smaller than 1280×800) must
/// not get a window that hangs off-screen XCTest then reports
/// sidebar controls at negative x as not hittable (run 34864198118).
private func configureMainWindow(_ window: NSWindow) {
window.setContentSize(NSSize(width: 1280, height: 800))
window.contentMinSize = NSSize(width: 1100, height: 700)
let desired = NSSize(width: 1280, height: 800)
let minimum = NSSize(width: 1100, height: 700)
let visible = (window.screen ?? NSScreen.main)?.visibleFrame
?? NSRect(origin: .zero, size: desired)
window.contentMinSize = NSSize(
width: min(minimum.width, visible.width),
height: min(minimum.height, visible.height)
)
window.setContentSize(NSSize(
width: min(desired.width, visible.width),
height: min(desired.height, max(minimum.height, visible.height - 40))
))
window.center()
var frame = window.frame
if frame.width > visible.width {
frame.size.width = visible.width
}
if frame.height > visible.height {
frame.size.height = visible.height
}
frame.origin.x = min(
max(frame.origin.x, visible.minX),
visible.maxX - frame.width
)
frame.origin.y = min(
max(frame.origin.y, visible.minY),
visible.maxY - frame.height
)
window.setFrame(frame, display: true)
}
/// Dock-click reopen: let the WindowGroup re-show or recreate the
+6 -4
View File
@@ -36,6 +36,7 @@ final class Milestone2UITests: XCTestCase {
"ICCERY_UI_TESTING": "1",
"ICCERY_TEST_ROOT": testRoot.path,
"ICCERY_ARGYLL_BINARY_DIR": binDir.path,
"ICCERY_CUPS_BIN_DIR": binDir.path,
"ICCERY_TEST_SAVE_TARGET":
workDir.appendingPathComponent("mytarget.ti1").path,
"ICCERY_TEST_WORKDIR": workDir.path,
@@ -218,11 +219,12 @@ final class Milestone2UITests: XCTestCase {
XCTAssertTrue(FileManager.default.fileExists(
atPath: workDir.appendingPathComponent("mytarget.ti2").path))
// Print panel is live from M3; a default printer is selected
// so both the all-pages and per-page print buttons are enabled.
// Print panel is live from M3. GitHub macos-14 has no system
// queues, so mock CUPS (`ICCERY_CUPS_BIN_DIR`) must enumerate
// before Print All / per-page enable (run 34867767434).
XCTAssertTrue(element("rawPrintPanel").exists)
XCTAssertTrue(app.buttons["btnPrintAll"].isEnabled)
XCTAssertTrue(app.buttons["btnPrintPage-0"].isEnabled)
_ = waitUntilEnabled("btnPrintAll", timeout: 15)
_ = waitUntilEnabled("btnPrintPage-0", timeout: 15)
XCTAssertTrue(app.buttons["btnAdvanceToStage3"].isEnabled)
}