Skip to content

Commit

Permalink
Merge branch 'develop' into native-socket
Browse files Browse the repository at this point in the history
# Conflicts:
#	Example/ExampleApp.xcodeproj/project.pbxproj
#	Example/IntegrationTests/History/HistoryTests.swift
#	Example/IntegrationTests/Push/PushTests.swift
#	Example/IntegrationTests/Sync/SyncTests.swift
#	Example/RelayIntegrationTests/RelayClientEndToEndTests.swift
#	Example/WalletApp/ApplicationLayer/ConfigurationService.swift
#	Example/WalletApp/ApplicationLayer/Configurator/ThirdPartyConfigurator.swift
#	Sources/WalletConnectRelay/Dispatching.swift
#	Sources/WalletConnectRelay/RelayURLFactory.swift
  • Loading branch information
alexander-lsvk committed Sep 7, 2023
2 parents 6203975 + e4556ef commit 2d78626
Show file tree
Hide file tree
Showing 285 changed files with 4,934 additions and 3,260 deletions.
5 changes: 4 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
project-id:
description: 'WalletConnect project id'
required: true
cache-key:
description: 'Cache key to use for caching'
required: true

runs:
using: "composite"
Expand All @@ -34,4 +37,4 @@ runs:
with:
path: |
products.tar
key: ${{ runner.os }}-deriveddata-${{ github.event.pull_request.head.sha }}
key: ${{ runner.os }}-deriveddata-${{ inputs.cache-key }}-${{ github.event.pull_request.head.sha }}
11 changes: 10 additions & 1 deletion .github/actions/run_tests_without_building/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ inputs:
gm-dapp-project-secret:
description: 'GM DApp Project Secret'
required: false
js-client-api-host:
description: 'JS Client Api Host'
required: false


runs:
using: "composite"
Expand Down Expand Up @@ -51,7 +55,7 @@ runs:
- name: Run integration tests
if: inputs.type == 'integration-tests'
shell: bash
run: make integration_tests RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }} CAST_HOST=${{ inputs.notify-endpoint }} GM_DAPP_PROJECT_ID=${{ inputs.gm-dapp-project-id }} GM_DAPP_PROJECT_SECRET=${{ inputs.gm-dapp-project-secret }}
run: make integration_tests RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }} CAST_HOST=${{ inputs.notify-endpoint }} GM_DAPP_PROJECT_ID=${{ inputs.gm-dapp-project-id }} GM_DAPP_PROJECT_SECRET=${{ inputs.gm-dapp-project-secret }} JS_CLIENT_API_HOST=${{ inputs.js-client-api-host }}

# Relay Integration tests
- name: Run Relay integration tests
Expand All @@ -71,6 +75,11 @@ runs:
shell: bash
run: make notify_tests RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }} CAST_HOST=${{ inputs.notify-endpoint }} GM_DAPP_PROJECT_ID=${{ inputs.gm-dapp-project-id }} GM_DAPP_PROJECT_SECRET=${{ inputs.gm-dapp-project-secret }}

- name: Run x-platform protocol tests
if: inputs.type == 'x-platform-protocol-tests'
shell: bash
run: make x_platform_protocol_tests RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }} JS_CLIENT_API_HOST=${{ inputs.js-client-api-host }}

# Slack notification for failing smoke and relay tests
- name: Slack Notification for Failure
if: failure() && (inputs.type == 'smoke-tests' || inputs.type == 'relay-tests')
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/build_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ on:
description: 'WalletConnect project id'
required: true
push:
branches: [ main ]
branches:
- main

jobs:
build:
runs-on: macos-12
runs-on:
group: apple-silicon
timeout-minutes: 15

steps:
Expand Down Expand Up @@ -44,4 +46,15 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: main-derivedData
path: products.tar
path: products.tar
if-no-files-found: error

# Slack notification for failing smoke and relay tests
- name: Slack Notification for Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: CI pipeline for preparing arifacts failed to build main branch or failed to upload artifact. Check the logs for more details.
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:

prepare:
needs: authorize
runs-on: macos-12
runs-on:
group: apple-silicon
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -31,10 +32,12 @@ jobs:
- uses: ./.github/actions/build
with:
project-id: ${{ secrets.PROJECT_ID }}
cache-key: ci

test:
needs: prepare
runs-on: macos-12
runs-on:
group: apple-silicon
timeout-minutes: 15
strategy:
fail-fast: false
Expand All @@ -50,7 +53,7 @@ jobs:
with:
path: |
products.tar
key: ${{ runner.os }}-deriveddata-${{ github.event.pull_request.head.sha }}
key: ${{ runner.os }}-deriveddata-ci-${{ github.event.pull_request.head.sha }}

- name: Untar DerivedDataCache
shell: bash
Expand All @@ -66,7 +69,7 @@ jobs:
- name: Run integration tests
if: matrix.type == 'integration-tests'
shell: bash
run: make integration_tests RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }} CAST_HOST=cast.walletconnect.com GM_DAPP_PROJECT_ID=${{ secrets.GM_DAPP_PROJECT_ID }} GM_DAPP_PROJECT_SECRET=${{ secrets.GM_DAPP_PROJECT_SECRET }}
run: make integration_tests RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }} CAST_HOST=notify.walletconnect.com GM_DAPP_PROJECT_ID=${{ secrets.GM_DAPP_PROJECT_ID }} GM_DAPP_PROJECT_SECRET=${{ secrets.GM_DAPP_PROJECT_SECRET }} JS_CLIENT_API_HOST=test-automation-api.walletconnect.com

# Relay Integration tests
- name: Run Relay integration tests
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-12
runs-on:
group: apple-silicon
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
workflow_dispatch:

jobs:
build:
build:
runs-on: macos-12

steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: |
Expand All @@ -26,12 +26,13 @@ jobs:
- name: Release
shell: bash
env:
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_USER: ${{ secrets.GH_USER }}
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }}
WALLETAPP_SENTRY_DSN: ${{ secrets.WALLETAPP_SENTRY_DSN }}
run: |
make release_all APPLE_ID=${{ secrets.APPLE_ID }} TOKEN=$(echo -n $GH_USER:$GH_TOKEN | base64) PROJECT_ID=${{ secrets.RELEASE_PROJECT_ID }}
make release_all APPLE_ID=${{ secrets.APPLE_ID }} TOKEN=$(echo -n $GH_USER:$GH_TOKEN | base64) PROJECT_ID=${{ secrets.RELEASE_PROJECT_ID }} WALLETAPP_SENTRY_DSN=${{ secrets.WALLETAPP_SENTRY_DSN }} MIXPANEL_TOKEN=${{secrets.MIXPANEL_TOKEN}}
53 changes: 53 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/NotifyTests.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NotifyTests"
BuildableName = "NotifyTests"
BlueprintName = "NotifyTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,13 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:Example/WalletConnect-Package.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
version = "1.3">
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -14,24 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectPush"
BuildableName = "WalletConnectPush"
BlueprintName = "WalletConnectPush"
ReferencedContainer = "container:..">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NotifyTests"
BuildableName = "NotifyTests"
BlueprintName = "NotifyTests"
ReferencedContainer = "container:..">
BlueprintIdentifier = "WalletConnectNotify"
BuildableName = "WalletConnectNotify"
BlueprintName = "WalletConnectNotify"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -40,19 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NotifyTests"
BuildableName = "NotifyTests"
BlueprintName = "NotifyTests"
ReferencedContainer = "container:..">
</BuildableReference>
</TestableReference>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -74,10 +49,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectPush"
BuildableName = "WalletConnectPush"
BlueprintName = "WalletConnectPush"
ReferencedContainer = "container:..">
BlueprintIdentifier = "WalletConnectNotify"
BuildableName = "WalletConnectNotify"
BlueprintName = "WalletConnectNotify"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
version = "1.3">
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectEcho"
BuildableName = "WalletConnectEcho"
BlueprintName = "WalletConnectEcho"
ReferencedContainer = "container:..">
BlueprintIdentifier = "WalletConnectPush"
BuildableName = "WalletConnectPush"
BlueprintName = "WalletConnectPush"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -26,9 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -50,10 +49,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectEcho"
BuildableName = "WalletConnectEcho"
BlueprintName = "WalletConnectEcho"
ReferencedContainer = "container:..">
BlueprintIdentifier = "WalletConnectPush"
BuildableName = "WalletConnectPush"
BlueprintName = "WalletConnectPush"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
9 changes: 8 additions & 1 deletion Configuration.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ RELAY_HOST = relay.walletconnect.com
// Uncomment next line and paste dapp's project secret to run all the notify tests
// GM_DAPP_PROJECT_SECRET = GM_DAPP_PROJECT_SECRET

CAST_HOST = cast.walletconnect.com
// Uncomment next line and paste js client's api host to run x-platform tests
// JS_CLIENT_API_HOST = JS_CLIENT_API_HOST

// WALLETAPP_SENTRY_DSN = WALLETAPP_SENTRY_DSN

// MIXPANEL_TOKEN = MIXPANEL_TOKEN

CAST_HOST = notify.walletconnect.com
9 changes: 9 additions & 0 deletions Example/DApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>metamask</string>
<string>trust</string>
<string>safe</string>
<string>zerion</string>
<string>rainbow</string>
<string>spot</string>
</array>
<key>CFBundleVersion</key>
<string>7</string>
<key>CFBundleShortVersionString</key>
Expand Down
Loading

0 comments on commit 2d78626

Please sign in to comment.