Skip to content

Instrumented Tests #203

Instrumented Tests

Instrumented Tests #203

name: SDKs Instrumented Tests
on:
workflow_dispatch:
inputs:
testTimeoutSeconds:
description: 'Seconds for test timeout'
required: true
default: 40 # should be same as env.TEST_TIMEOUT_SECONDS
shouldUseCache:
description: 'Flag to use and save cache gradle. Tests results are cached!'
required: true
default: false
# pull_request:
# branches:
# - develop
# - master
env:
TEST_TIMEOUT_SECONDS: 40 # 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:
strategy:
fail-fast: false
matrix:
conf: [
{ name: 'Full_Suite', command: "allDevicesCheck" },
]
max-parallel: 1
name: ${{ matrix.conf.name }}
runs-on: [apple-silicon]
steps:
- uses: actions/checkout@v3
- name: Run instrumented tests
uses: ./.github/actions/ci_instrumented_tests
with:
shouldUseCache: ${{ github.event.inputs.testTimeoutSeconds || true }} # Setting to true faster pass unchanged code
name: ${{ matrix.conf.name }}
command: ${{ matrix.conf.command }}
projectId: ${{ secrets.WC_CLOUD_PROJECT_ID }}
testTimeoutSeconds: ${{ github.event.inputs.testTimeoutSeconds || env.TEST_TIMEOUT_SECONDS }} # Prioritise dispatch input timeout over env one