-
Notifications
You must be signed in to change notification settings - Fork 547
57 lines (54 loc) · 1.58 KB
/
test.yml
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
name: Run Tests
on:
push:
branches:
- master
jobs:
test:
runs-on: macos-latest
#sequence of tasks called
steps:
- uses: actions/checkout@v1
# Setup a flutter environment.
# https://github.com/marketplace/actions/flutter-action
- uses: subosito/flutter-action@v1
with:
#flutter-version: '2.2.3'
channel: 'beta'
- run: flutter pub get
- run: cp lib/.env.dart.example lib/.env.dart
- run: flutter analyze
drive_ios:
strategy:
matrix:
device:
- "iPhone 11 Pro (14.4)"
- "iPad Pro (9.7-inch) (14.4)"
fail-fast: false
runs-on: macos-latest
needs: test
steps:
- name: List all simulators
run: xcrun instruments -s
# get UUID simulator and boot a simulator on mac from command line
- name: Start Simulator
run: |
UDID=$(
xcrun instruments -s |
awk \
-F ' *[][]' \
-v 'device=${{ matrix.device }}' \
'$1 == device { print $2 }'
)
xcrun simctl boot "${UDID:?No Simulator with this name found}"
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
#flutter-version: '2.2.3'
channel: 'beta'
- name: Setup App
run: |
cp lib/.env.dart.example lib/.env.dart
echo ${{secrets.firebase_ios}} | base64 --decode > ios/Runner/GoogleService-Info.plist
- name: Run iOS Flutter Driver tests
run: flutter drive --target=test_driver/login_it.dart