ci: run unit tests on GitHub Actions, revive SwiftLint, add Dependabot#191
Open
juliusknorr wants to merge 7 commits into
Open
ci: run unit tests on GitHub Actions, revive SwiftLint, add Dependabot#191juliusknorr wants to merge 7 commits into
juliusknorr wants to merge 7 commits into
Conversation
Add a Tests workflow that runs the IOCNotesUnitTests suite via `xcodebuild test` on a macOS runner for pushes and pull requests to main. Also remove the stale `iOCNotesTests` testable from the shared iOCNotes scheme; that target no longer exists in the project and would break `xcodebuild test`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuMUmwcBag6qfvo3B4zzKN Signed-off-by: Julius Knorr <jus@bitgrid.net>
The SwiftLint workflow was named `.swiftlint.yml`; GitHub Actions ignores workflow files whose names begin with a dot, so the lint check never ran. Rename it to `swiftlint.yml` so it is discovered and executed. Add `.github/dependabot.yml` to keep Swift Package Manager dependencies and the GitHub Actions used in our workflows up to date. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuMUmwcBag6qfvo3B4zzKN Signed-off-by: Julius Knorr <jus@bitgrid.net>
The test job hard-coded /Applications/Xcode_26.app, which does not exist on the runner and failed with "invalid developer directory". Switch to the macos-15 runner and select the newest installed Xcode dynamically so the job no longer depends on a specific Xcode path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuMUmwcBag6qfvo3B4zzKN Signed-off-by: Julius Knorr <jus@bitgrid.net>
The build embeds the SwiftLint build tool plugin, which requires interactive trust and fails in headless CI with "Plugin SwiftLintBuildToolPlugin ... must be enabled before it can be used". Pass -skipPackagePluginValidation to xcodebuild so package plugins are trusted automatically on the runner. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuMUmwcBag6qfvo3B4zzKN Signed-off-by: Julius Knorr <jus@bitgrid.net>
All tests currently fail instantly with no assertion output, which points to the host application failing to launch in the simulator. Add a failure-only step that extracts the test-results summary and any crash logs from the .xcresult bundle so the real cause is visible in the build log. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuMUmwcBag6qfvo3B4zzKN Signed-off-by: Julius Knorr <jus@bitgrid.net>
The whole test host process traps (signal trap) originating in the markdown formatting path, and the target's scheme marks it parallelizable, so every test then reports "crashed with signal trap". Disable parallel testing so the run is deterministic and xcodebuild prints the actual fatal-error line, which also rules in/out a concurrency cause. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuMUmwcBag6qfvo3B4zzKN Signed-off-by: Julius Knorr <jus@bitgrid.net>
…ndices MarkdownTextStorage.processEditing crashed the whole test suite with "String index is out of bounds" (signal trap) via String.nsRange(from:), which force-unwrapped samePosition(in:) and ran utf16.distance on indices that may not belong to the current backing string. - nsRange(from:): validate the range lies within the string and return an empty NSNotFound range instead of trapping on foreign/stale indices. - processEditing: clamp the edited location to the string length and intersect the formatting range with the full range, skipping formatting when the line conversion fails. - MarkdownTextStorageTests.applyText: use the UTF-16 length rather than the grapheme count, which is what NSTextStorage ranges are measured in. Also export crash backtraces from the .xcresult on failure so future crashes are diagnosable directly from the CI log. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuMUmwcBag6qfvo3B4zzKN Signed-off-by: Julius Knorr <jus@bitgrid.net>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds CI to actually run the unit test suite, fixes the SwiftLint workflow that was silently not running, and adds Dependabot.