-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.77 KB
/
reference_example.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
name: Reference Example Tests
on:
pull_request:
paths:
- packages/reference_example/**
- packages/reference/**
- .github/workflows/reference_example.yaml
push:
branches:
- master
env:
PLUGIN_DIR: packages/reference_example
jobs:
verify_android:
name: Android Tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: dev
- name: Android Build Test
run: |
cd $PLUGIN_DIR/example
flutter build apk
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: cd $PLUGIN_DIR/example && temp_file=$(mktemp) && flutter drive test_driver/reference_example.dart 2>&1 | tee $temp_file && if (grep "All tests passed\!" $temp_file) ; then (echo 0) else (echo 1) fi
verify_ios:
name: Ios Tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: dev
- name: Ios Build Test
run: |
cd $PLUGIN_DIR/example
flutter build ios --simulator --no-codesign
- name: Start iOS Simulator
run: |
xcrun simctl list
DEVICE_ID=$(xcrun simctl create My-iphoneX com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-14-4)
xcrun simctl boot $DEVICE_ID
- name: Ios Drive Tests
run: |
cd $PLUGIN_DIR/example
temp_file=$(mktemp)
flutter drive test_driver/reference_example.dart 2>&1 | tee $temp_file
if (grep "All tests passed\!" $temp_file) ; then (echo 0) else (echo 1) fi