-
-
Notifications
You must be signed in to change notification settings - Fork 24
92 lines (75 loc) · 2.66 KB
/
integrated-tests.yml
File metadata and controls
92 lines (75 loc) · 2.66 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
name: Integrated Tests
on:
pull_request:
branches: [ master ]
paths-ignore:
- 'fastlane/**'
- 'icons/**'
- 'images/**'
- 'scripts/**'
- 'whatsnew/**'
- '**.md'
- '**.MD'
# If two events are triggered within a short time in the same PR, cancel the run of the oldest event
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
integrated-tests:
name: 'Run Integrated UI Tests'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'jetbrains'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: 🏗 Disable Firebase
run: |
bash ./scripts/enableDisableFirebase.sh false
- name: Enable KVM group perms
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: Run instrumented tests on Android Emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
target: default
arch: x86_64
profile: Nexus 6
emulator-boot-timeout: 600
script: ./gradlew connectedFreeDebugAndroidTest --stacktrace
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: app/build/reports/androidTests/connected/
retention-days: 7
- name: 💬 Comment on PR with test results
uses: actions/github-script@v7
if: always() && github.event_name == 'pull_request'
with:
script: |
const runId = context.runId;
const repo = context.repo;
const prNumber = context.issue.number;
const runUrl = `https://github.com/${repo.owner}/${repo.repo}/actions/runs/${runId}`;
const comment = `## 🧪 Integrated Test Results
The integrated UI tests have completed.
**View full test results:** [Test Run #${runId}](${runUrl})
Test reports are available in the artifacts section of the workflow run.`;
github.rest.issues.createComment({
owner: repo.owner,
repo: repo.repo,
issue_number: prNumber,
body: comment
});