Skip to content

Conversation

@roanutil
Copy link
Owner

There is room for the tests to be improved, but I wanted this PR to be as 1-to-1 as reasonable. Further improvements will be done later.

feature/swift-testing
@roanutil roanutil requested review from Copilot and r-jarvis June 13, 2025 21:56
@roanutil roanutil changed the base branch from main to 3.0-preview June 13, 2025 21:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the swift tools and package configuration to leverage new Swift 5.10 features, introduces benchmark and testing targets, and adds example projects for demonstrating CoreDataRepository usage.

  • Updates Package.swift to use Swift 5.10, a shared platform definition, and new swift settings.
  • Adds new example apps and views to showcase repository usage and integrates benchmark targets when enabled.
  • Updates CI/CD workflows, dependabot settings, and test plans.

Reviewed Changes

Copilot reviewed 117 out of 118 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Package.swift Updates swift-tools-version, platforms, dependencies, and adds conditional benchmark configurations.
Examples/Relationships/RelationshipsExampleApp.swift Introduces a SwiftUI app entry point using CoreDataRepository.
Examples/Relationships/RelationshipsExample/FileCabinetsView.swift Implements a file cabinet view with asynchronous actions and state management.
Examples/Relationships/RelationshipsExample/FileCabinetDetailView.swift Provides a detail view for file cabinets including drawer creation.
Examples/Relationships/RelationshipsExample/FileCabinet.swift Defines the FileCabinet model and its Core Data mapping.
Examples/Relationships/RelationshipsExample/FileCabinet+Drawer.swift Extends drawer model functionality with Core Data integration.
Examples/Relationships/RelationshipsExample/Document.swift Defines the Document model and its Core Data conversion methods.
Examples/Relationships/RelationshipsExample/CoreDataStack.swift Configures Core Data stack and persistent container creation.
CI/CD and other configuration files Updates workflow, test plan, SwiftFormat, and dependabot configurations.
Files not reviewed (1)
  • Examples/Relationships/RelationshipsExample/RelationshipsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Language not supported
Comments suppressed due to low confidence (1)

Examples/Relationships/RelationshipsExample/Document.swift:38

  • The 'content' property of Document is not updated in the updating(managed:) method; consider adding an assignment for managed.content to ensure the managed representation stays in sync.
managed.id = id

feature/swift-testing
feature/swift-testing
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 96.64627% with 148 lines in your changes missing coverage. Please review.

Project coverage is 83.57%. Comparing base (dc094d0) to head (b6602eb).
Report is 28 commits behind head on 3.0-preview.

Files with missing lines Patch % Lines
Tests/CoreDataRepositoryTests/AggregateTests.swift 92.03% 42 Missing ⚠️
Tests/CoreDataRepositoryTests/ReadTests.swift 97.03% 20 Missing ⚠️
Tests/CoreDataRepositoryTests/DeleteTests.swift 93.51% 14 Missing ⚠️
...ts/CoreDataRepositoryTests/Delete_BatchTests.swift 97.99% 14 Missing ⚠️
...ests/CoreDataRepositoryTests/Read_BatchTests.swift 97.53% 14 Missing ⚠️
Tests/CoreDataRepositoryTests/UpdateTests.swift 95.07% 10 Missing ⚠️
Tests/CoreDataRepositoryTests/CreateTests.swift 94.48% 8 Missing ⚠️
...ts/CoreDataRepositoryTests/Create_BatchTests.swift 98.81% 8 Missing ⚠️
...ts/CoreDataRepositoryTests/CoreDataTestSuite.swift 94.30% 7 Missing ⚠️
Tests/CoreDataRepositoryTests/FetchTests.swift 93.13% 7 Missing ⚠️
... and 2 more
Additional details and impacted files
@@               Coverage Diff               @@
##           3.0-preview      #37      +/-   ##
===============================================
- Coverage        84.26%   83.57%   -0.69%     
===============================================
  Files               35       66      +31     
  Lines             2936     7604    +4668     
===============================================
+ Hits              2474     6355    +3881     
- Misses             462     1249     +787     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…r and tests for CoreDataTestSuite

feature/swift-testing
feature/swift-testing
Copy link
Collaborator

@r-jarvis r-jarvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why did you choose a nested @Suite setup here? I understand wanting .serialized at the parent level, but what does the child Suite in the extension add?

@roanutil
Copy link
Owner Author

roanutil commented Jun 24, 2025

Just curious, why did you choose a nested @Suite setup here? I understand wanting .serialized at the parent level, but what does the child Suite in the extension add?

The top level suite ensures all tests are serialized. Child suites just breakup the tests into related chunks. But really, it was just the most straightforward translation of the XCTest setup.

@r-jarvis r-jarvis merged commit 3c59f6f into 3.0-preview Jun 24, 2025
2 checks passed
@roanutil roanutil deleted the feature/swift-testing branch June 24, 2025 17:22
r-jarvis added a commit that referenced this pull request Jun 30, 2025
Feature/transactions (Depends on PR #37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants