-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (80 loc) · 2.7 KB
/
test-matrix-entry.yml
File metadata and controls
86 lines (80 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Test - Matrix Entry
on:
workflow_call:
inputs:
override-cache:
description: 'Override Cache?'
required: true
type: boolean
os:
description: 'GitHub Actions runner label to execute this test job on
(e.g. ubuntu-latest, macos-latest, windows-latest).'
required: true
type: string
name:
description: 'Logical name of the matrix entry, used for display and reporting
(for example: jvm, native, android, ios)'
required: true
type: string
testCommand:
description: 'Gradle command-line arguments specifying which tests to run'
required: true
type: string
enable-kvm:
description: 'Enable KVM for Android emulator tests'
required: false
default: false
type: boolean
setup-xcode:
description: 'set xcode version'
required: false
default: false
type: boolean
kotlin-version:
description: 'Override Kotlin version?'
required: false
default: ''
type: string
testballoon-version:
description: 'Override TestBalloon version (full version string)?'
required: false
default: ''
type: string
report-path:
description: Glob for test result XML files
type: string
required: false
default: "**/build/test-results/**/TEST*.xml,**/build/outputs/androidTest-results/managedDevice/**/TEST*.xml"
metrics-path:
description: Glob for metrics JSON files
required: false
type: string
default: "metrics/*.json"
jobs:
test:
name: Test - ${{ inputs.name }} on ${{ inputs.os }}
runs-on: ${{ inputs.os }}
timeout-minutes: 300
env:
KOTLIN_VERSION_ENV: ${{ inputs.kotlin-version }}
TESTBALLOON_VERSION_OVERRIDE: ${{ inputs.testballoon-version }}
steps:
- name: Common setup
uses: a-sit-plus/internal-workflows/.github/actions/common-setup@v2
with:
override-cache: ${{ inputs.override-cache }}
enable-kvm: ${{ inputs.enable-kvm }}
setup-xcode: ${{ inputs.setup-xcode }}
- name: Run tests
shell: 'bash'
run: |
export GRADLE_OPTS="-Dkotlin.build.report.json.directory=$PWD/metrics"
${{ inputs.testCommand }}
- name: Reporting
if: ${{ !cancelled() }}
uses: a-sit-plus/internal-workflows/.github/actions/common-reporting@v2
with:
report-name: ${{ github.workflow }}
matrix-identifier: ${{ runner.os }}-${{ inputs.name }}-${{ runner.arch }}
report-path: ${{ inputs.report-path }}
metrics-path: ${{ inputs.metrics-path }}