From bf58c899e3f54ab4d923df1ae09e34a4bb1c6d99 Mon Sep 17 00:00:00 2001 From: Radek Novak Date: Fri, 28 Apr 2023 17:59:22 +0200 Subject: [PATCH] Make restoring artifacts optional but warn --- .github/actions/build/action.yml | 5 +---- .github/actions/run_tests_without_building/action.yml | 3 ++- .github/workflows/build_artifacts.yml | 5 +---- .github/workflows/ci.yml | 2 +- Makefile | 6 +++--- Sources/WalletConnectVerify/AttestChallengeProvider.swift | 1 - 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 46fc1170c..7a6de086f 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -25,10 +25,7 @@ runs: - name: Build for testing shell: bash - env: - RELAY_ENDPOINT: ${{ inputs.relay-endpoint }} - PROJECT_ID: ${{ inputs.project-id }} - run: make build_all RELAY_HOST=$RELAY_ENDPOINT PROJECT_ID=$PROJECT_ID + run: make build_all RELAY_HOST=${{ inputs.project-id }} PROJECT_ID=${{ inputs.project-id }} - name: Tar DerivedDataCache shell: bash diff --git a/.github/actions/run_tests_without_building/action.yml b/.github/actions/run_tests_without_building/action.yml index 89919b3a3..d26d772fa 100644 --- a/.github/actions/run_tests_without_building/action.yml +++ b/.github/actions/run_tests_without_building/action.yml @@ -22,10 +22,11 @@ runs: name: main-derivedData workflow: build_artifacts.yml repo: 'WalletConnect/WalletConnectSwiftV2' + if_no_artifact_found: warn - name: Untar DerivedDataCache shell: bash - run: tar xPpf products.tar + run: test -f products.tar && tar xPpf products.tar || echo "No artifacts to untar" # Package Unit tests - name: Run tests diff --git a/.github/workflows/build_artifacts.yml b/.github/workflows/build_artifacts.yml index 0dd5db6ee..9d65e03d6 100644 --- a/.github/workflows/build_artifacts.yml +++ b/.github/workflows/build_artifacts.yml @@ -24,10 +24,7 @@ jobs: - name: Build for testing shell: bash - env: - RELAY_ENDPOINT: relay.walletconnect.com - PROJECT_ID: ${{ secrets.PROJECT_ID }} - run: make build_all + run: make build_all RELAY_HOST=${{ inputs.project-id }} PROJECT_ID=${{ inputs.project-id }} - name: Tar DerivedDataCache shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9d040c27..532bc731b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - name: Untar DerivedDataCache shell: bash - run: tar xPpf products.tar + run: test -f products.tar && tar xPpf products.tar || echo "No artifacts to untar" # Package Unit tests - name: Run tests diff --git a/Makefile b/Makefile index cdc856b29..a816db3f0 100755 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ build_wallet: fastlane build scheme:WalletApp echo_ui_tests: - fastlane tests scheme:EchoUITests relay_host:$(RELAY_HOST) project_id:$(PROJECT_ID) + echo "EchoUITests disabled" ui_tests: echo "UI Tests disabled" @@ -42,9 +42,9 @@ unitxctestrun = $(shell find . -name '*WalletConnect-Package*.xctestrun') unit_tests: test_setup ifneq ($(unitxctestrun),) - set -o pipefail && env NSUnbufferedIO=YES xcodebuild -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath DerivedDataCache -resultBundlePath 'test_results/UnitTests.xcresult' -xctestrun '$(integrationxctestrun)' test-without-building | tee ./test_results/xcodebuild.log | xcpretty --report junit --output ./test_results/report.junit + set -o pipefail && env NSUnbufferedIO=YES xcodebuild -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath DerivedDataCache -resultBundlePath 'test_results/UnitTests.xcresult' -xctestrun '$(unitxctestrun)' test-without-building | tee ./test_results/xcodebuild.log | xcpretty --report junit --output ./test_results/report.junit else - set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme WalletConnect-Package -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath DerivedDataCache -resultBundlePath 'test_results/UnitTests.xcresult' RELAY_HOST='$(RELAY_HOST)' PROJECT_ID='$(PROJECT_ID)' test | tee ./test_results/xcodebuild.log | xcpretty --report junit --output ./test_results/report.junit + set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme WalletConnect-Package -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath DerivedDataCache -resultBundlePath 'test_results/UnitTests.xcresult' test | tee ./test_results/xcodebuild.log | xcpretty --report junit --output ./test_results/report.junit endif integrationxctestrun = $(shell find . -name '*_IntegrationTests*.xctestrun') diff --git a/Sources/WalletConnectVerify/AttestChallengeProvider.swift b/Sources/WalletConnectVerify/AttestChallengeProvider.swift index 5d2891e67..ac9a0eaa3 100644 --- a/Sources/WalletConnectVerify/AttestChallengeProvider.swift +++ b/Sources/WalletConnectVerify/AttestChallengeProvider.swift @@ -6,7 +6,6 @@ protocol AttestChallengeProviding { class AttestChallengeProvider: AttestChallengeProviding { func getChallenge() async throws -> Data { - return Data() fatalError("not implemented") } }