Skip to content

Commit aec445a

Browse files
authored
ci: add Swift 5.8 job (#234)
* ci: add Swift 5.8 job * fix: swift 5.8
1 parent af18efc commit aec445a

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ jobs:
4545
- name: Run Tests
4646
run: swift test
4747

48+
library-compatibility:
49+
runs-on: ubuntu-latest
50+
name: Test Library (Swift 5.8)
51+
steps:
52+
- uses: swift-actions/setup-swift@v1
53+
with:
54+
swift-version: "5.8"
55+
- uses: actions/checkout@v3
56+
- name: Run Tests
57+
run: swift test
58+
4859
library-windows:
4960
runs-on: windows-latest
5061
name: Test Library (Windows)

Sources/Realtime/V2/PostgresAction.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ public enum AnyAction: PostgresAction, HasRawMessage {
7575

7676
var wrappedAction: any PostgresAction & HasRawMessage {
7777
switch self {
78-
case let .insert(action): action
79-
case let .update(action): action
80-
case let .delete(action): action
81-
case let .select(action): action
78+
case let .insert(action): return action
79+
case let .update(action): return action
80+
case let .delete(action): return action
81+
case let .select(action): return action
8282
}
8383
}
8484

Sources/Realtime/V2/RealtimeChannelV2.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,10 @@ public actor RealtimeChannelV2 {
253253

254254
let postgresActions = try data.decode(as: PostgresActionData.self)
255255

256-
let action: AnyAction = switch postgresActions.type {
256+
let action: AnyAction
257+
switch postgresActions.type {
257258
case "UPDATE":
258-
.update(
259+
action = .update(
259260
UpdateAction(
260261
columns: postgresActions.columns,
261262
commitTimestamp: postgresActions.commitTimestamp,
@@ -266,7 +267,7 @@ public actor RealtimeChannelV2 {
266267
)
267268

268269
case "DELETE":
269-
.delete(
270+
action = .delete(
270271
DeleteAction(
271272
columns: postgresActions.columns,
272273
commitTimestamp: postgresActions.commitTimestamp,
@@ -276,7 +277,7 @@ public actor RealtimeChannelV2 {
276277
)
277278

278279
case "INSERT":
279-
.insert(
280+
action = .insert(
280281
InsertAction(
281282
columns: postgresActions.columns,
282283
commitTimestamp: postgresActions.commitTimestamp,
@@ -286,7 +287,7 @@ public actor RealtimeChannelV2 {
286287
)
287288

288289
case "SELECT":
289-
.select(
290+
action = .select(
290291
SelectAction(
291292
columns: postgresActions.columns,
292293
commitTimestamp: postgresActions.commitTimestamp,

0 commit comments

Comments
 (0)