Skip to content

Commit

Permalink
add linux job
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Sep 30, 2024
1 parent 56eae3a commit b0bd408
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ jobs:
if: matrix.skip_release != '1'
run: make COMMAND="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild

linux:
name: linux
strategy:
matrix:
swift-version: ["5.10"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift-version }}
- run: make dot-env
- name: Run tests
run: swift test --skip IntegrationTests


# library-evolution:
# name: Library (evolution)
# runs-on: macos-14
Expand Down
7 changes: 0 additions & 7 deletions Tests/AuthTests/SessionManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ final class SessionManagerTests: XCTestCase {
configuration: .init(
url: clientURL,
localStorage: InMemoryLocalStorage(),
logger: TestLogger(),
autoRefreshToken: false
),
http: http,
Expand Down Expand Up @@ -112,9 +111,3 @@ final class SessionManagerTests: XCTestCase {
}
}
}

struct TestLogger: SupabaseLogger {
func log(message: SupabaseLogMessage) {
print(message.description)
}
}
12 changes: 2 additions & 10 deletions Tests/IntegrationTests/RealtimeIntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,19 @@ import Supabase
import TestHelpers
import XCTest

struct Logger: SupabaseLogger {
func log(message: SupabaseLogMessage) {
print(message.description)
}
}

final class RealtimeIntegrationTests: XCTestCase {
let realtime = RealtimeClientV2(
url: URL(string: "\(DotEnv.SUPABASE_URL)/realtime/v1")!,
options: RealtimeClientOptions(
headers: ["apikey": DotEnv.SUPABASE_ANON_KEY],
logger: Logger()
headers: ["apikey": DotEnv.SUPABASE_ANON_KEY]
)
)

let db = PostgrestClient(
url: URL(string: "\(DotEnv.SUPABASE_URL)/rest/v1")!,
headers: [
"apikey": DotEnv.SUPABASE_ANON_KEY,
],
logger: Logger()
]
)

override func invokeTest() {
Expand Down
3 changes: 1 addition & 2 deletions Tests/RealtimeTests/RealtimeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ final class RealtimeTests: XCTestCase {
headers: ["apikey": apiKey],
heartbeatInterval: 1,
reconnectDelay: 1,
timeoutInterval: 2,
logger: TestLogger()
timeoutInterval: 2
),
ws: ws,
http: http
Expand Down
3 changes: 1 addition & 2 deletions Tests/StorageTests/SupabaseStorageClient+Test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ extension SupabaseStorageClient {
"Authorization": "Bearer \(apiKey)",
"Apikey": apiKey,
],
session: session,
logger: ConsoleLogger()
session: session
)
)
}
Expand Down

0 comments on commit b0bd408

Please sign in to comment.