Skip to content

ci: add Swift 5.8 job #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 4, 2024
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
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ jobs:
- name: Run Tests
run: swift test

library-compatibility:
runs-on: ubuntu-latest
name: Test Library (Swift 5.8)
steps:
- uses: swift-actions/setup-swift@v1
with:
swift-version: "5.8"
- uses: actions/checkout@v3
- name: Run Tests
run: swift test

library-windows:
runs-on: windows-latest
name: Test Library (Windows)
Expand Down
8 changes: 4 additions & 4 deletions Sources/Realtime/V2/PostgresAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public enum AnyAction: PostgresAction, HasRawMessage {

var wrappedAction: any PostgresAction & HasRawMessage {
switch self {
case let .insert(action): action
case let .update(action): action
case let .delete(action): action
case let .select(action): action
case let .insert(action): return action
case let .update(action): return action
case let .delete(action): return action
case let .select(action): return action
}
}

Expand Down
11 changes: 6 additions & 5 deletions Sources/Realtime/V2/RealtimeChannelV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,10 @@ public actor RealtimeChannelV2 {

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

let action: AnyAction = switch postgresActions.type {
let action: AnyAction
switch postgresActions.type {
case "UPDATE":
.update(
action = .update(
UpdateAction(
columns: postgresActions.columns,
commitTimestamp: postgresActions.commitTimestamp,
Expand All @@ -266,7 +267,7 @@ public actor RealtimeChannelV2 {
)

case "DELETE":
.delete(
action = .delete(
DeleteAction(
columns: postgresActions.columns,
commitTimestamp: postgresActions.commitTimestamp,
Expand All @@ -276,7 +277,7 @@ public actor RealtimeChannelV2 {
)

case "INSERT":
.insert(
action = .insert(
InsertAction(
columns: postgresActions.columns,
commitTimestamp: postgresActions.commitTimestamp,
Expand All @@ -286,7 +287,7 @@ public actor RealtimeChannelV2 {
)

case "SELECT":
.select(
action = .select(
SelectAction(
columns: postgresActions.columns,
commitTimestamp: postgresActions.commitTimestamp,
Expand Down