Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
run: swift test --enable-code-coverage
- name: Swift Coverage Report
run: xcrun llvm-cov export -format="lcov" .build/debug/CoreDataRepositoryPackageTests.xctest/Contents/MacOS/CoreDataRepositoryPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage_report.lcov
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true # optional (default = false)
8 changes: 4 additions & 4 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/CoreDataRepository+Batch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/CoreDataRepository+CRUD.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/CoreDataRepository+Fetch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CombineExt
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/CoreDataRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/CoreDataRepositoryError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Foundation

Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/FetchSubscription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import CoreData
import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import CoreData
import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import CoreData
import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/ReadSubscription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
4 changes: 2 additions & 2 deletions Sources/CoreDataRepository/RepositoryManagedModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import CoreData

/// A protocol for a CoreData NSManagedObject sub class that has a corresponding value type
public protocol RepositoryManagedModel: NSManagedObject {
associatedtype Unmanaged: UnmanagedModel where Unmanaged.RepoManaged == Self
associatedtype Unmanaged: UnmanagedModel
/// Returns a value type instance of `self`
var asUnmanaged: Unmanaged { get }
/// Create `self` from a corresponding instance of `UnmanagedModel`. Should not save the context.
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/Result+CRUDHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import CoreData
import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/SubscriptionProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

public protocol SubscriptionProvider {
var id: AnyHashable { get }
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/UnmanagedModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import CoreData
import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreDataRepository/_Result.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Foundation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Tests/CoreDataRepositoryTests/BatchRepositoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Tests/CoreDataRepositoryTests/CRUDRepositoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Tests/CoreDataRepositoryTests/CoreDataStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import CoreData

Expand Down
4 changes: 2 additions & 2 deletions Tests/CoreDataRepositoryTests/CoreDataXCTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down Expand Up @@ -93,7 +93,7 @@ class CoreDataXCTestCase: XCTestCase {
let historyResult = try XCTUnwrap(repositoryContext().execute(historyRequest) as? NSPersistentHistoryResult)
let history = try XCTUnwrap(historyResult.result as? [NSPersistentHistoryTransaction])
XCTAssertGreaterThan(history.count, 0)
history.forEach { historyTransaction in
for historyTransaction in history {
XCTAssertEqual(historyTransaction.author, transactionAuthor)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/CoreDataRepositoryTests/FetchRepositoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import Combine
import CoreData
Expand Down
2 changes: 1 addition & 1 deletion Tests/CoreDataRepositoryTests/Movie.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// MIT License
//
// Copyright © 2023 Andrew Roan
// Copyright © 2024 Andrew Roan

import CoreData
import CoreDataRepository
Expand Down