From 2ebe539b115460073e4d61ec134424dcd32331c5 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Sat, 16 Nov 2024 12:01:12 +0100 Subject: [PATCH] WIP Signed-off-by: Yuki Kishimoto --- .github/workflows/swift-bindings.yml | 37 +++++++++++++++++++ .../Tests/NostrSDKTests/NostrSDKTests.swift | 4 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/swift-bindings.yml diff --git a/.github/workflows/swift-bindings.yml b/.github/workflows/swift-bindings.yml new file mode 100644 index 000000000..dcfe6df33 --- /dev/null +++ b/.github/workflows/swift-bindings.yml @@ -0,0 +1,37 @@ +name: Test Swift Bindings + +on: + workflow_dispatch: + push: + paths: + - "bindings/nostr-sdk-ffi/**" + +jobs: + build: + runs-on: macos-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7 + + - name: Install dependencies + run: | + brew update + brew install swiftlint + gem install xcpretty + + - 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() + } }