Skip to content

Commit d4df5cb

Browse files
authored
Merge pull request #11 from roanutil/update-workflow
Update workflow
2 parents 662d7e8 + f62a99b commit d4df5cb

File tree

52 files changed

+165
-168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+165
-168
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,35 @@
1-
name: CI
1+
name: ci
22

33
on:
44
push:
55
branches:
66
- main
77
pull_request:
88
branches:
9-
- '*'
9+
- "*"
1010
workflow_dispatch:
1111

1212
jobs:
1313
lint:
14-
runs-on: macos-13
14+
runs-on: macos-latest
1515
environment: default
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v3
18+
- name: SwiftFormat version
19+
run: swiftformat --version
1820
- name: Format lint
1921
run: swiftformat --lint .
22+
- name: Install SwiftLint
23+
run: brew install swiftlint
24+
- name: SwiftLint version
25+
run: swiftlint --version
2026
- name: Lint
21-
run: swiftlint .
27+
run: swiftlint lint --quiet
2228
macos-test:
29+
runs-on: macos-14
2330
environment: default
24-
strategy:
25-
matrix:
26-
include:
27-
- os: macos-14
28-
xcode: 15.2 # Swift 5.9
29-
- os: macos-14
30-
xcode: 15.3 # Swift 5.10
31-
runs-on: ${{ matrix.os }}
3231
steps:
33-
- uses: actions/checkout@v4
34-
- name: Select Xcode ${{ matrix.xcode }}
35-
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
32+
- uses: actions/checkout@v3
3633
- name: Run Tests
3734
run: swift test --enable-code-coverage --parallel
3835
- name: Swift Coverage Report
@@ -44,8 +41,8 @@ jobs:
4441
linux-test:
4542
runs-on: ubuntu-latest
4643
environment: default
47-
44+
4845
steps:
49-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@v3
5047
- name: Run Tests
51-
run: swift test --parallel
48+
run: swift test --parallel

.swiftformat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--extensionacl on-declarations
22
--redundanttype explicit
3-
--swiftversion 5.5
3+
--swiftversion 5.9
44
--maxwidth 120
5-
--header "{file}\nFilter\n\n\nMIT License\n\nCopyright © {year} Andrew Roan"
6-
--allman false
5+
--header "{file}\nFilter\n\n\nMIT License\n\nCopyright Andrew Roan"
6+
--allman false

Sources/Filter/Collection/AnyCollectionPredicate.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2024 Andrew Roan
7+
// Copyright Andrew Roan
88

99
import Foundation
1010

@@ -17,7 +17,7 @@ public protocol AnyCollectionPredicate {
1717
/// - keyPath: KeyPath<Root, Value>
1818
/// - Returns
1919
/// - Output
20-
static func build<Root, Value>(from filter: CollectionFilter<Value>, on keyPath: KeyPath<Root, Value>) -> Output
20+
static func build<Value>(from filter: CollectionFilter<Value>, on keyPath: KeyPath<some Any, Value>) -> Output
2121
where Value: Collection
2222
}
2323

@@ -28,7 +28,7 @@ extension AnyCollectionPredicate {
2828
/// - Returns
2929
/// - Output
3030
@inlinable
31-
public static func build<Value>(from filter: CollectionFilter<Value>) -> Output where Value: Collection {
31+
public static func build(from filter: CollectionFilter<some Collection>) -> Output {
3232
build(from: filter, on: \.self)
3333
}
3434
}

Sources/Filter/Collection/CollectionFilter.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2024 Andrew Roan
7+
// Copyright Andrew Roan
88

99
import Foundation
1010

@@ -28,11 +28,11 @@ public enum CollectionFilter<C>: Equatable where C: Collection, C: Equatable, C.
2828
public var unwrapped: CollectionFilter<C>? {
2929
switch self {
3030
case let .orNil(unwrapped):
31-
return unwrapped
31+
unwrapped
3232
case let .notNil(unwrapped):
33-
return unwrapped
33+
unwrapped
3434
case .isNil:
35-
return nil
35+
nil
3636
}
3737
}
3838
}

Sources/Filter/Collection/CollectionPredicate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2024 Andrew Roan
7+
// Copyright Andrew Roan
88

99
import Foundation
1010

Sources/Filter/Collection/OptionalAnyCollectionPredicate.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2024 Andrew Roan
7+
// Copyright Andrew Roan
88

99
import Foundation
1010

@@ -16,7 +16,7 @@ public protocol OptionalAnyCollectionPredicate: AnyCollectionPredicate {
1616
/// - keyPath: KeyPath<Root, Value?>
1717
/// - Returns
1818
/// - Output
19-
static func build<Model, Value>(from filter: CollectionFilter<Value>.Optional, on keyPath: KeyPath<Model, Value?>)
19+
static func build<Value>(from filter: CollectionFilter<Value>.Optional, on keyPath: KeyPath<some Any, Value?>)
2020
-> Output where Value: Collection
2121
}
2222

@@ -27,7 +27,7 @@ extension OptionalAnyCollectionPredicate {
2727
/// - Returns
2828
/// - Output
2929
@inlinable
30-
public static func build<Value>(from filter: CollectionFilter<Value>.Optional) -> Output where Value: Collection {
30+
public static func build(from filter: CollectionFilter<some Collection>.Optional) -> Output {
3131
build(from: filter, on: \.self)
3232
}
3333
}

Sources/Filter/Collection/OptionalCollectionPredicate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2024 Andrew Roan
7+
// Copyright Andrew Roan
88

99
import Foundation
1010

Sources/Filter/Comparable/AnyComparablePredicate.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2024 Andrew Roan
7+
// Copyright Andrew Roan
88

99
import Foundation
1010

@@ -16,7 +16,7 @@ public protocol AnyComparablePredicate: AnyEquatablePredicate {
1616
/// - keyPath: KeyPath<Root, Value>
1717
/// - Returns
1818
/// - Output
19-
static func build<Root, Value>(from filter: ComparableFilter<Value>, on keyPath: KeyPath<Root, Value>) -> Output
19+
static func build<Value>(from filter: ComparableFilter<Value>, on keyPath: KeyPath<some Any, Value>) -> Output
2020
where Value: Comparable
2121
}
2222

@@ -27,7 +27,7 @@ extension AnyComparablePredicate {
2727
/// - Returns
2828
/// - Output
2929
@inlinable
30-
public static func build<Value>(from filter: ComparableFilter<Value>) -> Output where Value: Comparable {
30+
public static func build(from filter: ComparableFilter<some Comparable>) -> Output {
3131
build(from: filter, on: \.self)
3232
}
3333
}

Sources/Filter/Comparable/ComparableFilter.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2024 Andrew Roan
7+
// Copyright Andrew Roan
88

99
import Foundation
1010

@@ -69,11 +69,11 @@ public enum ComparableFilter<T: Comparable>: Equatable {
6969
public var unwrapped: ComparableFilter<T>? {
7070
switch self {
7171
case let .orNil(unwrapped):
72-
return unwrapped
72+
unwrapped
7373
case let .notNil(unwrapped):
74-
return unwrapped
74+
unwrapped
7575
case .isNil:
76-
return nil
76+
nil
7777
}
7878
}
7979
}

Sources/Filter/Comparable/ComparablePredicate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2024 Andrew Roan
7+
// Copyright Andrew Roan
88

99
import Foundation
1010

0 commit comments

Comments
 (0)