-
Notifications
You must be signed in to change notification settings - Fork 6
120 lines (102 loc) · 4.59 KB
/
SystemTests.yml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: SystemTests
on:
pull_request:
branches:
- main
schedule:
# Trigger on start of the day every working day (stolen from player nightly)
- cron: '0 0 * * MON-FRI'
workflow_dispatch:
jobs:
# Runs instrumented tests on a Pixel 6 API 34 emulator.
system-tests:
# This condition is necessary to avoid having an endless search for the bitdash runner occurring on the public repo which is not part of the bitmovin-engineering organization.
# Furthermore, we only needs these checks internally.
# Linked ticket: https://bitmovin.atlassian.net/browse/AN-4297
# You can obtain this id by running the following command in the terminal while being on the repository page:
# $("meta[name=octolytics-dimension-repository_id]").getAttribute('content')
if: github.repository_id == 310696148
# This job cannot run on the default runner, as it requires many resources.
runs-on: bitdash-4core
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Setup Android
uses: android-actions/setup-android@v3
- name: Enable KVM
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: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
cache-read-only: false
# Collector Test
- name: Tests Collector
if: always()
run: |
./gradlew :collector:pixel6api34DebugAndroidTest
# Collector Bitmovin Player Test
- name: Tests Collector Bitmovin Player
if: always()
run: |
./gradlew :collector-bitmovin-player:pixel6api34DebugAndroidTest
# Collector Exo Player Test
- name: Tests Collector Exoplayer
if: always()
run: |
./gradlew :collector-exoplayer:pixel6api34DebugAndroidTest
# Collector Media3 Exo Player Test
- name: Tests Collector Media3 Exoplayer
if: always()
run: |
./gradlew :collector-media3-exoplayer:pixel6api34DebugAndroidTest
## Collector Amazon IVS Test
- name: Tests Collector Amazon IVS
if: always()
run: |
./gradlew :collector-amazon-ivs:pixel6api34DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.notClass=com.bitmovin.analytics.amazon.ivs.TVBasicScenariosTest
# If it fails on the main branch, send a slack message (merged PR or nightly tests)
- name: Send a Slack message whenever the tests fails on the main branch
if: failure() && github.ref == 'refs/heads/main'
uses: slackapi/slack-github-action@v1
with:
# The Slack Webhook URL only takes one parameter which is the link to the failed action.
payload: |
{
"failedActionUrl": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# Create Report which can be analyzed in the github ui directly
- name: Publish SystemTest Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/outputs/androidTest-results/managedDevice/debug/pixel6api34/TEST-*.xml'
- name: Copying Reports
if: always()
id: copy-reports
run: |
mkdir reports
cp -r collector/build/reports/androidTests/managedDevice/debug/pixel6api34/ reports/collector
cp -r collector-bitmovin-player/build/reports/androidTests/managedDevice/debug/pixel6api34/ reports/collector-bitmovin-player
cp -r collector-exoplayer/build/reports/androidTests/managedDevice/debug/pixel6api34/ reports/collector-exoplayer
cp -r collector-media3-exoplayer/build/reports/androidTests/managedDevice/debug/pixel6api34/ reports/collector-media3-exoplayer
cp -r collector-amazon-ivs/build/reports/androidTests/managedDevice/debug/pixel6api34/ reports/collector-amazon-ivs
cp .github/tests-report/INDEX_TEST_REPORTS.html reports/index.html
./.github/tests-report/report_enhancer.sh reports
- name: Upload Reports
uses: actions/upload-artifact@v4
if: always()
with:
name: tests-report
path: reports