From f85800911711f04c8758072f5b37912c440a1ba8 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Sat, 16 Nov 2024 12:01:12 +0100 Subject: [PATCH] ci: test Swift Package Signed-off-by: Yuki Kishimoto --- .github/workflows/bindings.yml | 29 +++++++++++++++++++ .../Tests/NostrSDKTests/NostrSDKTests.swift | 4 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/bindings.yml diff --git a/.github/workflows/bindings.yml b/.github/workflows/bindings.yml new file mode 100644 index 000000000..0b5be57fc --- /dev/null +++ b/.github/workflows/bindings.yml @@ -0,0 +1,29 @@ +name: Bindings CI + +on: + workflow_dispatch: + push: + paths: + - "bindings/nostr-sdk-ffi/**" + pull_request: + paths: + - "bindings/nostr-sdk-ffi/**" + +jobs: + swift: + name: Swift Package + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install just + run: cargo install just + + - name: Build Swift Package + working-directory: bindings/nostr-sdk-ffi + run: just swift + + - name: Test + working-directory: bindings/nostr-sdk-ffi/swift + run: swift test diff --git a/bindings/nostr-sdk-ffi/swift/Tests/NostrSDKTests/NostrSDKTests.swift b/bindings/nostr-sdk-ffi/swift/Tests/NostrSDKTests/NostrSDKTests.swift index 241dac8bd..b0f71ae70 100644 --- a/bindings/nostr-sdk-ffi/swift/Tests/NostrSDKTests/NostrSDKTests.swift +++ b/bindings/nostr-sdk-ffi/swift/Tests/NostrSDKTests/NostrSDKTests.swift @@ -2,5 +2,7 @@ import XCTest @testable import NostrSDK final class NostrSDKTests: XCTestCase { - func testExample() throws {} + func testExample() throws { + var client: Client = ClientBuilder.init().build() + } }