Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:WalletConnect/WalletConnectSwift…
Browse files Browse the repository at this point in the history
…V2 into #296-update-thread-creation

# Conflicts:
#	Sources/Chat/NetworkingInteractor.swift
#	Sources/WalletConnectRelay/RelayClient.swift
  • Loading branch information
llbartekll committed Jul 5, 2022
2 parents 235fdb9 + e0382df commit 0deae3c
Show file tree
Hide file tree
Showing 73 changed files with 1,104 additions and 711 deletions.
47 changes: 36 additions & 11 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ on:
branches: [ main, develop ]

jobs:
build:
build:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Setup Xcode Version
uses: maxim-lobanov/setup-xcode@v1
Expand All @@ -21,24 +20,50 @@ jobs:

- uses: actions/cache@v2
with:
path: .build
path: |
.build
SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
# Package builds
- name: Build Package
run: swift build -v
- name: Run tests
run: swift test -v
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme WalletConnect \
-clonedSourcePackagesDirPath SourcePackages \
-sdk iphonesimulator"

# Example app builds
# Integration tests
- name: Run integration tests
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme IntegrationTests \
-clonedSourcePackagesDirPath SourcePackages \
-destination 'platform=iOS Simulator,name=iPhone 13' test"

# Wallet build
- name: Build Example Wallet
run: xcodebuild -project Example/ExampleApp.xcodeproj -scheme Wallet -sdk iphonesimulator
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme Wallet \
-clonedSourcePackagesDirPath SourcePackages \
-sdk iphonesimulator"

# DApp build
- name: Build Example Dapp
run: xcodebuild -project Example/ExampleApp.xcodeproj -scheme DApp -sdk iphonesimulator
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme DApp \
-clonedSourcePackagesDirPath SourcePackages \
-sdk iphonesimulator"

# UI tests
- name: UI Tests
run: xcodebuild -project Example/ExampleApp.xcodeproj -scheme UITests -destination 'platform=iOS Simulator,name=iPhone 13' test
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme UITests \
-clonedSourcePackagesDirPath SourcePackages \
-destination 'platform=iOS Simulator,name=iPhone 13' test"
continue-on-error: true
30 changes: 10 additions & 20 deletions .swiftpm/xcode/xcshareddata/xcschemes/WalletConnect.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -192,26 +192,6 @@
</BuildableReference>
</CodeCoverageTargets>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectTests"
BuildableName = "WalletConnectTests"
BlueprintName = "WalletConnectTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "IntegrationTests"
BuildableName = "IntegrationTests"
BlueprintName = "IntegrationTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
Expand Down Expand Up @@ -272,6 +252,16 @@
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ChatTests"
BuildableName = "ChatTests"
BlueprintName = "ChatTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
13 changes: 12 additions & 1 deletion Example/DApp/SceneDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import UIKit
import WalletConnectSign
import WalletConnectRelay
import Combine
import Starscream

extension WebSocket: WebSocketConnecting { }

struct SocketFactory: WebSocketFactory {
func create(with url: URL) -> WebSocketConnecting {
return WebSocket(url: url)
}
}

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

Expand All @@ -18,7 +28,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
description: "a description",
url: "wallet.connect",
icons: ["https://avatars.githubusercontent.com/u/37784886"])
Sign.configure(Sign.Config(metadata: metadata, projectId: "8ba9ee138960775e5231b70cc5ef1c3a"))

Sign.configure(metadata: metadata, projectId: "8ba9ee138960775e5231b70cc5ef1c3a", socketFactory: SocketFactory())

if CommandLine.arguments.contains("-cleanInstall") {
try? Sign.instance.cleanup()
Expand Down
35 changes: 0 additions & 35 deletions Example/DappTests/DappTests.swift

This file was deleted.

Loading

0 comments on commit 0deae3c

Please sign in to comment.