From 4536db3f092950d758058901c97a8849ac49b7cd Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:34:06 -0600 Subject: [PATCH 1/4] ci: build on the shared ci-workflows macOS workflow Runs the repository's build (and tests where it has them) on the KOF macOS host runner through ci-workflows macos.yaml. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..f506666 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,13 @@ +name: build +on: + push: + branches: ['**'] + tags: ['v*'] +jobs: + macos: + uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@native-workflows + secrets: inherit + with: + commands: | + xcodegen generate + xcodebuild -quiet -project markdownViewr.xcodeproj -scheme markdownViewr -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO test -- 2.54.0 From ab3731e0df394561212c7027dc8f0c3a5ac9dd0a Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:37:16 -0600 Subject: [PATCH 2/4] fix: qualify Markdown.Document for the Xcode 27 SDK SwiftUI now declares a Document protocol, so the unqualified name in the plain-text visitor is ambiguous and the build fails. Co-Authored-By: Claude Opus 5.5 --- markdownViewr/MarkdownDocument.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdownViewr/MarkdownDocument.swift b/markdownViewr/MarkdownDocument.swift index 212caf9..df800f0 100644 --- a/markdownViewr/MarkdownDocument.swift +++ b/markdownViewr/MarkdownDocument.swift @@ -275,7 +275,7 @@ struct MarkdownDocument: FileDocument { private struct HTMLConverter: MarkupWalker { private var result = "" - mutating func visit(_ document: Document) -> String { + mutating func visit(_ document: Markdown.Document) -> String { result = "" for child in document.children { visitChild(child) -- 2.54.0 From 77b927443431a46c7efff151e2fd9e89c97375e8 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:46:19 -0600 Subject: [PATCH 3/4] ci: pin the shared workflow to v1 Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index f506666..c5dca02 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -5,7 +5,7 @@ on: tags: ['v*'] jobs: macos: - uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@native-workflows + uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@v1 secrets: inherit with: commands: | -- 2.54.0 From be68c9f1bb13eb796fdcee7653ca97c7deba5b57 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 17:24:40 -0600 Subject: [PATCH 4/4] ci: build only on CI; run the app-hosted tests locally The grogu runner has no GUI session, so xcodebuild test cannot reach testmanagerd. CI compiles the app and the test bundle unsigned (build-for-testing); the README documents running just test locally. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build.yaml | 5 ++++- README.md | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index c5dca02..771551f 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -8,6 +8,9 @@ jobs: uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@v1 secrets: inherit with: + # Build only: the app and the test bundle are compiled unsigned, the tests are not run. They are + # app-hosted XCTests and the grogu runner has no GUI session for testmanagerd; run `just test` + # locally before merging (README, Building from Source). Package.swift has no test target. commands: | xcodegen generate - xcodebuild -quiet -project markdownViewr.xcodeproj -scheme markdownViewr -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO test + xcodebuild -quiet -project markdownViewr.xcodeproj -scheme markdownViewr -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build-for-testing diff --git a/README.md b/README.md index c373514..caa7000 100644 --- a/README.md +++ b/README.md @@ -61,3 +61,12 @@ just run ``` `just --list` shows all available recipes. + +### Tests + +The tests are app-hosted XCTests (`markdownViewrTests`). CI builds the app and the test bundle unsigned +but does not run them (the CI macOS runner has no GUI session), so run them locally before merging: + +```bash +just test # xcodegen generate first if the project is stale +``` -- 2.54.0