Skip to content

reown migration

reown migration #3

name: Instrumented Tests
on:
workflow_dispatch:
inputs:
testTimeoutSeconds:
description: 'Seconds for test timeout'
required: true
default: 120 # should be same as env.TEST_TIMEOUT_SECONDS
pull_request:
branches:
- develop
- master
path:
- 'core/android/**'
- 'protocol/sign/**'
- 'protocol/notify/**'
env:
TEST_TIMEOUT_SECONDS: 120 # Predefined timeout for integration tests
concurrency:
# Support push/pr as event types with different behaviors each:
# 1. push: queue up builds by branch
# 2. pr: only allow one run per PR
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }}
# If there is already a workflow running for the same pull request, cancel it
# For non-PR triggers queue up builds
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
sdk_tests:
name: Run Instrumented Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check what modules were changed
id: what_modules_changed
shell: bash
run: |
check_changes() {
local module_path=$1
local output_variable_name=$2
changes=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- "$module_path/")
if [ -n "$changes" ]; then
echo "${output_variable_name}=true" >> $GITHUB_OUTPUT
echo "${output_variable_name}=true"
else
echo "${output_variable_name}=false" >> $GITHUB_OUTPUT
echo "${output_variable_name}=false"
fi
}
check_changes "core/android" "CORE_MODULE_CHANGED"
check_changes "protocol/sign" "SIGN_MODULE_CHANGED"
check_changes "protocol/notify" "NOTIFY_MODULE_CHANGED"
- name: Setup Required files to build SDKs
with:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
FIREBASE_SERVICE_CREDENTIALS: ${{ secrets.FIREBASE_SERVICE_CREDENTIALS }}
SECRETS_PROPERTIES: ${{ secrets.SECRETS_PROPERTIES }}
ENCODED_STRING_DEBUG: ${{ secrets.WC_KOTLIN_DEBUG_KEYSTORE }}
SIGNING_KEY_STORE_PATH_DEBUG: ${{ secrets.WC_KOTLIN_DEBUG_KEYSTORE_PATH }}
ENCODED_STRING_INTERNAL: ${{ secrets.WC_KOTLIN_INTERNAL_KEYSTORE }}
SIGNING_KEY_STORE_PATH_INTERNAL: ${{ secrets.WC_KOTLIN_INTERNAL_KEYSTORE_PATH }}
ENCODED_STRING_UPLOAD: ${{ secrets.WC_KOTLIN_UPLOAD_KEYSTORE }}
SIGNING_KEY_STORE_PATH_UPLOAD: ${{ secrets.WC_KOTLIN_UPLOAD_KEYSTORE_PATH }}
uses: ./.github/actions/ci_setup
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run Core instrumented tests
if: ${{ steps.what_modules_changed.outputs.CORE_MODULE_CHANGED == 'true' || github.event_name == 'workflow_dispatch' }}
uses: ./.github/actions/ci_instrumented_tests
with:
name: "Android_Core_SDK"
command: ":core:android:allDevicesCheck"
projectId: ${{ secrets.WC_CLOUD_PROJECT_ID }}
notifyProjectId: ${{ secrets.NOTIFY_INTEGRATION_TESTS_PROJECT_ID }}
notifySecret: ${{ secrets.NOTIFY_INTEGRATION_TESTS_SECRET }}
testTimeoutSeconds: ${{ github.event.inputs.testTimeoutSeconds || env.TEST_TIMEOUT_SECONDS }} # Prioritise dispatch input timeout over env one
- name: Run Sign instrumented tests
if: ${{ steps.what_modules_changed.outputs.CORE_MODULE_CHANGED == 'true' || steps.what_modules_changed.outputs.SIGN_MODULE_CHANGED == 'true' || github.event_name == 'workflow_dispatch' }}
uses: ./.github/actions/ci_instrumented_tests
with:
name: "Sign_SDK"
command: ":protocol:sign:allDevicesCheck"
projectId: ${{ secrets.WC_CLOUD_PROJECT_ID }}
notifyProjectId: ${{ secrets.NOTIFY_INTEGRATION_TESTS_PROJECT_ID }}
notifySecret: ${{ secrets.NOTIFY_INTEGRATION_TESTS_SECRET }}
testTimeoutSeconds: ${{ github.event.inputs.testTimeoutSeconds || env.TEST_TIMEOUT_SECONDS }} # Prioritise dispatch input timeout over env one
- name: Run Notify instrumented tests
if: false
# if: ${{ steps.what_modules_changed.outputs.CORE_MODULE_CHANGED == 'true' || steps.what_modules_changed.outputs.NOTIFY_MODULE_CHANGED == 'true' || github.event_name == 'workflow_dispatch' }}
uses: ./.github/actions/ci_instrumented_tests
with:
name: "Notify_SDK"
command: ":protocol:notify:allDevicesCheck"
projectId: ${{ secrets.WC_CLOUD_PROJECT_ID }}
notifyProjectId: ${{ secrets.NOTIFY_INTEGRATION_TESTS_PROJECT_ID }}
notifySecret: ${{ secrets.NOTIFY_INTEGRATION_TESTS_SECRET }}
testTimeoutSeconds: ${{ github.event.inputs.testTimeoutSeconds || env.TEST_TIMEOUT_SECONDS }} # Prioritise dispatch input timeout over env one