Skip to content

Commit add9cee

Browse files
authored
Simplify CI (#140)
* Simplify CI * Fix DocC docs
1 parent bf23cf7 commit add9cee

File tree

5 files changed

+44
-42
lines changed

5 files changed

+44
-42
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,11 @@ concurrency:
1515

1616
jobs:
1717
library:
18-
strategy:
19-
matrix:
20-
platform:
21-
- iOS Simulator,name=iPhone 14 Pro
22-
- macOS
23-
- macOS,variant=Mac Catalyst
24-
- tvOS Simulator,name=Apple TV
25-
- watchOS Simulator,name=Apple Watch Series 8 (41mm)
2618
runs-on: macos-13
2719
name: Test Library
2820
steps:
2921
- uses: actions/checkout@v3
3022
- name: Select Xcode 14.3
3123
run: sudo xcode-select -s /Applications/Xcode_14.3.app
3224
- name: Run tests
33-
run: env PLATFORM="${{ matrix.platform }}" make test-library
34-
35-
# example:
36-
# strategy:
37-
# matrix:
38-
# platform:
39-
# - iOS Simulator,name=iPhone 14 Pro
40-
# example:
41-
# - Examples
42-
# runs-on: macos-13
43-
# name: Build Example
44-
# steps:
45-
# - uses: actions/checkout@v3
46-
# - name: Select Xcode 14.3
47-
# run: sudo xcode-select -s /Applications/Xcode_14.3.app
48-
# - name: Run pre-build script
49-
# run: sh Examples/${{ matrix.example }}/.ci/pre_build.sh || exit 0;
50-
# - name: Build example
51-
# run: env PLATFORM="${{ matrix.platform }}" EXAMPLE="${{ matrix.example }}" make build-example
25+
run: make test-library

Makefile

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,44 @@
1-
PLATFORM ?= iOS Simulator,name=iPhone 15 Pro
2-
EXAMPLE ?= Examples
1+
PLATFORM_IOS = iOS Simulator,name=iPhone 14 Pro
2+
PLATFORM_MACOS = macOS
3+
PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst
4+
PLATFORM_TVOS = tvOS Simulator,name=Apple TV
5+
PLATFORM_WATCHOS = watchOS Simulator,name=Apple Watch Series 8 (41mm)
6+
EXAMPLE = Examples
37

48
test-library:
5-
xcodebuild test \
6-
-workspace supabase-swift.xcworkspace \
7-
-scheme Supabase-Package \
8-
-destination platform="$(PLATFORM)" || exit 1;
9+
for platform in "$(PLATFORM_IOS)" "$(PLATFORM_MACOS)" "$(PLATFORM_MAC_CATALYST)" "$(PLATFORM_TVOS)" "$(PLATFORM_WATCHOS)"; do \
10+
xcodebuild test \
11+
-workspace supabase-swift.xcworkspace \
12+
-scheme Supabase-Package \
13+
-destination platform="$$platform" || exit 1; \
14+
done;
15+
16+
build-for-library-evolution:
17+
swift build \
18+
-c release \
19+
--target Supabase \
20+
-Xswiftc -emit-module-interface \
21+
-Xswiftc -enable-library-evolution
22+
23+
24+
DOC_WARNINGS = $(shell xcodebuild clean docbuild \
25+
-scheme Supabase \
26+
-destination platform="$(PLATFORM_MACOS)" \
27+
-quiet \
28+
2>&1 \
29+
| grep "couldn't be resolved to known documentation" \
30+
| sed 's|$(PWD)|.|g' \
31+
| tr '\n' '\1')
32+
test-docs:
33+
@test "$(DOC_WARNINGS)" = "" \
34+
|| (echo "xcodebuild docbuild failed:\n\n$(DOC_WARNINGS)" | tr '\1' '\n' \
35+
&& exit 1)
936

1037
build-example:
1138
xcodebuild build \
1239
-workspace supabase-swift.xcworkspace \
1340
-scheme "$(EXAMPLE)" \
14-
-destination platform="$(PLATFORM)" || exit 1;
41+
-destination platform="$(PLATFORM_IOS)" || exit 1;
1542

1643
format:
1744
@swiftformat .

Sources/GoTrue/GoTrueClient.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import Foundation
22
@_spi(Internal) import _Helpers
33

4-
public typealias AnyJSON = _Helpers.AnyJSON
5-
64
#if canImport(FoundationNetworking)
75
import FoundationNetworking
86
#endif
@@ -84,7 +82,7 @@ public actor GoTrueClient {
8482

8583
/// Returns the session, refreshing it if necessary.
8684
///
87-
/// If no session can be found, a ``GoTrueError.sessionNotFound`` error is thrown.
85+
/// If no session can be found, a ``GoTrueError/sessionNotFound`` error is thrown.
8886
public var session: Session {
8987
get async throws {
9088
try await sessionManager.session()

Sources/GoTrue/Types.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import Foundation
2+
@_spi(Internal) import _Helpers
3+
4+
public typealias AnyJSON = _Helpers.AnyJSON
25

36
public enum AuthChangeEvent: String, Sendable {
47
case initialSession = "INITIAL_SESSION"
@@ -424,12 +427,12 @@ public struct AuthMFAEnrollResponse: Decodable, Hashable, Sendable {
424427
}
425428

426429
public struct MFAChallengeParams: Encodable, Hashable {
427-
/// ID of the factor to be challenged. Returned in ``GoTrueMFA.enroll(params:)``.
430+
/// ID of the factor to be challenged. Returned in ``GoTrueMFA/enroll(params:)``.
428431
public let factorId: String
429432
}
430433

431434
public struct MFAVerifyParams: Encodable, Hashable {
432-
/// ID of the factor being verified. Returned in ``GoTrueMFA.enroll(params:)``.
435+
/// ID of the factor being verified. Returned in ``GoTrueMFA/enroll(params:)``.
433436
public let factorId: String
434437

435438
/// ID of the challenge being verified. Returned in challenge().
@@ -440,7 +443,7 @@ public struct MFAVerifyParams: Encodable, Hashable {
440443
}
441444

442445
public struct MFAUnenrollParams: Encodable, Hashable, Sendable {
443-
/// ID of the factor to unenroll. Returned in ``GoTrueMFA.enroll(params:)``.
446+
/// ID of the factor to unenroll. Returned in ``GoTrueMFA/enroll(params:)``.
444447
public let factorId: String
445448

446449
public init(factorId: String) {
@@ -449,7 +452,7 @@ public struct MFAUnenrollParams: Encodable, Hashable, Sendable {
449452
}
450453

451454
public struct MFAChallengeAndVerifyParams: Encodable, Hashable, Sendable {
452-
/// ID of the factor to be challenged. Returned in ``GoTrueMFA.enroll(params:)``.
455+
/// ID of the factor to be challenged. Returned in ``GoTrueMFA/enroll(params:)``.
453456
public let factorId: String
454457

455458
/// Verification code provided by the user.

Sources/Storage/StorageFileApi.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public class StorageFileApi: StorageApi {
232232
}
233233

234234
/// Downloads a file from a private bucket. For public buckets, make a request to the URL returned
235-
/// from ``getPublicURL`` instead.
235+
/// from ``StorageFileApi/getPublicURL(path:download:fileName:options:)`` instead.
236236
/// - Parameters:
237237
/// - path: The file path to be downloaded, including the path and file name. For example
238238
/// `folder/image.png`.

0 commit comments

Comments
 (0)