Coverage - #27
Merged
Merged
Conversation
Configure Codecov with: - 70-100% coverage range target - 5% threshold for project coverage - 80% patch coverage target (informational) - Ignore patterns for test files and app entry points
Create MiddleDragTests target with 22 unit tests: - GestureModelsTests: 10 tests covering GestureState, GestureConfiguration, and UserPreferences - TouchModelsTests: 12 tests covering MTPoint, TouchState, and TrackedFinger Tests validate core model behavior including: - Distance and midpoint calculations - State machine transitions - Velocity sensitivity calculations - Touch tracking logic
- Add test target with build configurations - Configure test host to run against MiddleDrag.app - Enable code coverage in scheme - Add testable reference to scheme's TestAction
- Rename workflow to 'Build & Test' - Switch to Debug configuration for coverage data - Add test step with code coverage enabled - Convert coverage to lcov format - Upload results to Codecov via codecov-action@v5 Requires CODECOV_TOKEN secret to be configured.
Configure Bitrise as primary CI with: - primary workflow: build, test, coverage upload to Codecov - deploy workflow: release/distribution builds - Xcode 16.2 on M1 machines - DerivedData caching for faster builds Requires CODECOV_TOKEN secret in Bitrise.
Bitrise now handles primary CI with tests and coverage. GitHub Actions provides quick build verification for PRs only.
Copilot started reviewing on behalf of
NullPointerDepressiveDisorder
December 19, 2025 02:27
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request establishes a comprehensive testing and CI/CD infrastructure for the MiddleDrag project. It introduces unit tests for core model logic, configures Bitrise CI for automated testing with code coverage reporting to Codecov, and streamlines the GitHub Actions workflow for faster build validation. The changes lay the foundation for maintaining code quality through automated testing while keeping the existing GitHub Actions workflow focused on quick build checks.
Key changes:
- Added comprehensive unit tests for
GestureModelsandTouchModelswith 100% coverage of model logic - Configured Bitrise CI pipeline with automated test execution, coverage generation (lcov format), and Codecov integration
- Updated GitHub Actions workflow to run Debug builds on PRs targeting main, with clearer step naming
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
codecov.yml |
Configures Codecov with appropriate coverage targets, ignores test files and app entry points |
bitrise.yml |
Defines primary workflow for build/test/coverage and deploy workflow for releases using Xcode 16.2.x |
MiddleDragTests/TouchModelsTests.swift |
Comprehensive tests for MTPoint geometry, TouchState enums, and TrackedFinger behavior |
MiddleDragTests/GestureModelsTests.swift |
Thorough tests for GestureState, GestureConfiguration (including velocity boost logic), and UserPreferences |
MiddleDrag.xcodeproj/xcshareddata/xcschemes/MiddleDrag.xcscheme |
Enables code coverage and registers the MiddleDragTests target for test actions |
MiddleDrag.xcodeproj/project.pbxproj |
Adds MiddleDragTests target with proper configuration, file references, and build phases |
.github/workflows/objective-c-xcode.yml |
Simplifies workflow to PR-only triggers, renames to "Build Check", switches to Debug configuration |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Karan Mohindroo <96403086+NullPointerDepressiveDisorder@users.noreply.github.com>
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.
This pull request introduces a comprehensive test suite for the core model logic of the app, adds Bitrise CI configuration with automated code coverage reporting, and improves the Xcode project and GitHub Actions workflow setup to better support testing and CI integration. The changes are grouped into three main themes: testing infrastructure, CI/CD improvements, and project configuration updates.
Testing Infrastructure
GestureModelsTests.swiftandTouchModelsTests.swift, providing extensive unit tests for gesture, touch, and user preference models. [1] [2]MiddleDragTests, into the Xcode project, including proper groupings, build phases, and configuration for unit testing. [1] [2] [3] [4] [5] [6] [7] [8] [9]CI/CD Improvements
bitrise.ymlconfiguration for Bitrise CI, enabling automated build, test, code coverage generation (with lcov export), and upload to Codecov.MiddleDrag.xcscheme) to enable code coverage and register the new test target for test actions.Project Configuration and Workflow Updates
mainbranch, renaming steps for clarity, and switching the build configuration fromReleasetoDebugfor quicker feedback. [1] [2] [3]These updates collectively enhance the project's reliability, testability, and CI/CD integration, ensuring higher code quality and easier maintenance.