Skip to content

Commit

Permalink
Merge branch 'develop' into pending-session-proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-lsvk committed Jul 7, 2023
2 parents bba9420 + 8d8b97d commit c3999be
Show file tree
Hide file tree
Showing 331 changed files with 6,753 additions and 2,077 deletions.
7 changes: 3 additions & 4 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ runs:
using: "composite"
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/cache@v3
with:
path: |
**/SourcePackagesCache
DerivedDataCache
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Build for testing
shell: bash
Expand All @@ -35,4 +34,4 @@ runs:
with:
path: |
products.tar
key: ${{ runner.os }}-deriveddata-${{ github.ref }}-${{ github.sha }}
key: ${{ runner.os }}-deriveddata-${{ github.event.pull_request.head.sha }}
35 changes: 31 additions & 4 deletions .github/actions/run_tests_without_building/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ inputs:
description: 'The endpoint of the relay e.g. relay.walletconnect.com'
required: false
default: 'relay.walletconnect.com'
notify-endpoint:
description: 'The endpoint of the notify server e.g. cast.walletconnect.com'
required: false
default: 'cast.walletconnect.com'
project-id:
description: 'WalletConnect project id'
required: true
slack-webhook-url:
description: 'Smoke tests slack webhoook url'
required: false
gm-dapp-project-id:
description: 'GM DApp Project ID'
required: false


runs:
using: "composite"
Expand Down Expand Up @@ -38,27 +49,43 @@ 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 }}
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 }}

# Relay Integration tests
- name: Run Relay integration tests
if: inputs.type == 'relay-tests'
shell: bash
run: make relay_tests RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }}
run: make relay_tests RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }} CAST_HOST=${{ inputs.notify-endpoint }}

# Smoke tests
- name: Run smoke tests
if: inputs.type == 'smoke-tests'
shell: bash
run: make smoke_tests RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }}

# Notify tests
- name: Run notify tests
if: inputs.type == 'notify-tests'
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 }}

# Slack notification for failing smoke and relay tests
- name: Slack Notification for Failure
if: failure() && (inputs.type == 'smoke-tests' || inputs.type == 'relay-tests')
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: The smoke tests failed in the CI pipeline. Check the logs for more details.
env:
SLACK_WEBHOOK_URL: ${{ inputs.slack-webhook-url }}

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure()
with:
check_name: ${{ inputs.type }} junit report
report_paths: 'test_results/report.junit'

- name: Zip test artifacts
if: always()
shell: bash
Expand All @@ -70,4 +97,4 @@ runs:
with:
name: ${{ inputs.type }} test_results
path: ./artifacts.zip
if-no-files-found: warn
if-no-files-found: warn
3 changes: 0 additions & 3 deletions .github/workflows/build_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ jobs:
with:
path: |
**/SourcePackagesCache
DerivedDataCache
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Build for testing on workflow_dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# it takes pull request name
# and automatically commit it as a package version
# pull request name should always be a version of a new release
#
# After version bump publishing Cocoapods release

name: cd

Expand All @@ -13,29 +11,21 @@ on:
branches: [ main ]
env:
PACKAGE_VERSION: ${{ github.event.pull_request.title }}

jobs:
set-user-agent:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}

- name: Set User Agent
shell: bash
run: ./.github/scripts/set-user-agent.sh

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Set User Agent
tagging_message: ${{ github.event.pull_request.title }}
skip_checkout: true

- name: Publish to CocoaPod register
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
- name: Lint CocoaPods
run: |
pod trunk push WalletConnectSwiftV2.podspec --verbose --allow-warnings
pod lib lint --verbose --no-clean --quick --allow-warnings --platforms=ios WalletConnectSwiftV2.podspec
38 changes: 23 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
name: ci

on:
pull_request:
branches: [ main, develop ]
pull_request_target:
branches:
- develop
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.event.pull_request.number || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}
jobs:
authorize:
environment:
${{ (github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository) &&
'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: echo ✓

prepare:
needs: authorize
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/build
with:
Expand All @@ -29,14 +43,14 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/cache/restore@v3
with:
path: |
products.tar
key: ${{ runner.os }}-deriveddata-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-deriveddata-${{ github.ref }}-
key: ${{ runner.os }}-deriveddata-${{ github.event.pull_request.head.sha }}

- name: Untar DerivedDataCache
shell: bash
Expand All @@ -52,20 +66,14 @@ 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 }}
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 }}

# Relay Integration tests
- name: Run Relay integration tests
if: matrix.type == 'relay-tests'
shell: bash
run: make relay_tests RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }}

# Smoke tests
- name: Run smoke tests
if: matrix.type == 'smoke-tests'
shell: bash
run: make smoke_tests RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }}

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure()
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/cocoapods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: cocoapods

on:
release:
types: [ published ]
jobs:
set-user-agent:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}

- name: Publish to CocoaPod register
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
pod trunk push WalletConnectSwiftV2.podspec --verbose --allow-warnings
48 changes: 0 additions & 48 deletions .github/workflows/intake.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ xcuserdata/
# Swift Package Manager
Packages/
Package.pins
Package.resolved
/*.xcodeproj

# Fastlane
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectHistory"
BuildableName = "WalletConnectHistory"
BlueprintName = "WalletConnectHistory"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</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">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectHistory"
BuildableName = "WalletConnectHistory"
BlueprintName = "WalletConnectHistory"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit c3999be

Please sign in to comment.