-
Notifications
You must be signed in to change notification settings - Fork 46
97 lines (86 loc) · 2.52 KB
/
uitests.yaml
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
name: UITest
on:
workflow_dispatch:
inputs:
device:
required: true
default: 'Pixel8_API33'
type: choice
options:
- 'Pixel8_API33'
- 'Pixel8_API35'
runner:
required: true
default: 'autotestdebug'
type: choice
options:
- 'autotestdebug'
- 'ubuntu-latest'
jobs:
build:
name: build android application for ui tests
runs-on: ${{ github.event.inputs.runner || 'autotestdebug' }}
timeout-minutes: 30
steps:
- name: checkout source code of application
uses: actions/checkout@v4
with:
clean: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
# server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
# settings-path: ${{ github.workspace }} # location for the settings.xml file
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
# - name: Gradle clean cache
# uses: burrunan/gradle-cache-action@v1
# with:
# job-id: jdk17
# arguments: build
# gradle-version: wrapper
# properties: |
# kotlin.js.compiler=ir
# kotlin.parallel.tasks.in.project=true
- name: Build with Gradle
run: ./gradlew :banner:assembleDebug
- name: save debug build for aws
uses: actions/upload-artifact@v4
with:
name: banner-debug.apk
path: banner/build/outputs/apk/debug/banner-debug.apk
retention-days: 14
tests:
name: run ui tests on aws with appium
needs: build
runs-on: ${{ github.event.inputs.runner || 'autotestdebug' }}
timeout-minutes: 30
steps:
- name: checkout source code of application
uses: actions/checkout@v4
with:
path: 'SDK-Auto-Test'
clean: true
repository: 'appodeal/SDK-Auto-Test'
token: ${{ secrets.UITESTREPOACCESS }}
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: download debug build
uses: actions/download-artifact@v4
with:
name: banner-debug.apk
path: ./SDK-Auto-Test/apk
- name: prepare build
run: |
mvn clean
sleep 5
mvn jar:jar
sleep 5
mvn jar:test-jar
sleep 5
mvn assembly:single -DskipTests -Ddescriptor=src/main/assembly/zip.xml