forked from leancodepl/patrol
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (72 loc) · 3.13 KB
/
test-android-device.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: test android device
on:
workflow_dispatch:
schedule:
- cron: '30 21 * * *'
jobs:
main:
name: Test on Android device on Firebase Test Lab
runs-on: ubuntu-latest
timeout-minutes: 90
defaults:
run:
working-directory: packages/patrol/example
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: '${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY_JSON }}'
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Gradle cache
uses: gradle/gradle-build-action@v2
with:
generate-job-summary: false
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: ${{ matrix.flutter-channel }}
- name: Preload Flutter artifacts
run: flutter precache
- name: Generate Gradle wrapper
run: flutter build apk --debug --flavor=does-not-exist || true
- run: ./run_android_testlab integration_test/android_app_test.dart
- run: ./run_android_testlab integration_test/example_test.dart
if: success() || failure()
- run: ./run_android_testlab integration_test/notifications_test.dart
if: success() || failure()
- run: ./run_android_testlab integration_test/open_app_test.dart
if: success() || failure()
- run: ./run_android_testlab integration_test/open_quick_settings_test.dart
if: success() || failure()
- run: ./run_android_testlab integration_test/permissions_location_test.dart
if: ${{ false }} # Doesn't handle the "Google location services" popup
- run: ./run_android_testlab integration_test/permissions_many_test.dart
if: success() || failure()
- run: ./run_android_testlab integration_test/service_airplane_mode_test.dart
if: ${{ false }} # Not implemented on Android
- run: ./run_android_testlab integration_test/service_bluetooth_test.dart
if: ${{ false }} # Not implemented on Android
- run: ./run_android_testlab integration_test/service_cellular_test.dart
if: success() || failure()
- run: ./run_android_testlab integration_test/service_dark_mode_test.dart
if: success() || failure()
- run: ./run_android_testlab integration_test/service_wifi_test.dart
if: success() || failure()
- run: ./run_android_testlab integration_test/swipe_test.dart
if: success() || failure()
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: Firebase Test Lab
SLACK_ICON: https://lh3.googleusercontent.com/gi3juiFPUx9A8vMvHqozISdrbTy-Rg6gjecG9k0J_Wnz_GJktwfkHu3iRpu8RFb8nAWSAjIZX0HEm0fO1ZNChQ
SLACK_TITLE: Android test status
SLACK_MESSAGE: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}