-
Notifications
You must be signed in to change notification settings - Fork 4
96 lines (76 loc) · 2.31 KB
/
ci.yml
File metadata and controls
96 lines (76 loc) · 2.31 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
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup secrets
run: |
echo tmdb_api_key=${{ secrets.TMDB_API_KEY }} >> gradle.properties
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Paparazzi tests
run: ./gradlew verifyPaparazziDebug
- name: Unit Tests
run: ./gradlew test
- name: Build the app
run: ./gradlew assemble
test:
runs-on: ubuntu-latest
timeout-minutes: 30
services:
wiremock:
image: ghcr.io/lordraydenmk/wiremock
ports:
- 8080:8080
steps:
- name: Checkout
uses: actions/checkout@v6
- 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 Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Setup secrets
run: |
echo tmdb_api_key=${{ secrets.TMDB_API_KEY }} >> gradle.properties
- name: Install Maestro
run: |
curl -Ls "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
- name: Run Maestro E2E Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
./gradlew installDebug -Ptmdb_base_url=http://10.0.2.2:8080/
chmod +x e2e.sh
./e2e.sh
- name: Archive Maestro test results on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: maestro-test-results
path: ~/.maestro/tests/*/