-
-
Notifications
You must be signed in to change notification settings - Fork 286
113 lines (95 loc) · 3.9 KB
/
Copy pathintegration_test.yml
File metadata and controls
113 lines (95 loc) · 3.9 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Integration test
on:
push:
paths:
- .github/workflows/integration_test.yml
- "demo_app/**"
- "packages/fwfh_chewie/**"
- "packages/fwfh_webview/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
cache: true
- uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
# only update gradle cache from demo_app.yml jobs
cache-read-only: true
- run: echo JAVA_HOME=$JAVA_HOME_17_X64 >> $GITHUB_ENV
- name: Run patrol build
run: |
set -e
dart pub global activate patrol_cli 4.1.0
cd demo_app
flutter build apk --config-only
patrol build android --verbose --target patrol_test/auto_resize_test.dart
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
with:
credentials_json: ${{ secrets.FIREBASE_TEST_LAB_CREDENTIALS_JSON }}
- uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
- name: Firebase Test Lab
run: |
set -e
# https://github.com/leancodepl/patrol/blob/1e24994/.github/workflows/test-android-device.yaml#L28
export ANDROID_DEVICE_MODEL=shiba
export ANDROID_DEVICE_VERSION=34
cd demo_app
gcloud firebase test android run \
--app build/app/outputs/apk/debug/app-debug.apk \
--client-details matrixLabel="GitHub #${{ github.run_id }}" \
--device model="$ANDROID_DEVICE_MODEL",version="$ANDROID_DEVICE_VERSION",locale=en,orientation=portrait \
--results-bucket=fwfh-dev-patrol-public \
--test build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--timeout 10m \
--type instrumentation \
--use-orchestrator
ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
cache: true
- name: Unlock Fastlane secrets
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
run: |
set -e
brew install git-crypt
echo "${GIT_CRYPT_KEY}" | base64 -d >/tmp/git-crypt-key
git-crypt unlock /tmp/git-crypt-key
- name: Run patrol build
run: |
set -e
dart pub global activate patrol_cli 4.1.0
cd demo_app/ios
fastlane patrol_build
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
with:
credentials_json: ${{ secrets.FIREBASE_TEST_LAB_CREDENTIALS_JSON }}
- uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
- name: Firebase Test Lab
run: |
set -e
# https://github.com/leancodepl/patrol/blob/1e24994/.github/workflows/test-ios-device.yaml#L24
export IOS_DEVICE_MODEL=iphone14pro
export IOS_DEVICE_VERSION=16.6
cd demo_app/build/ios_integ/Build/Products
zip -r ios_tests.zip Release-iphoneos/*.app *.xctestrun
gcloud firebase test ios run \
--client-details matrixLabel="GitHub #${{ github.run_id }}" \
--device model="$IOS_DEVICE_MODEL",version="$IOS_DEVICE_VERSION",locale=en_US,orientation=portrait \
--results-bucket=fwfh-dev-patrol-public \
--test ios_tests.zip \
--timeout 10m \
--type xctest