1
- # Name of your workflow.
2
- name : flutter drive on ios
1
+ name : Test-iOS
3
2
on :
4
3
push :
5
4
branches :
6
5
- ' main'
7
6
pull_request :
8
7
branches :
9
8
- ' *'
10
-
11
- # A workflow run is made up of one or more jobs.
12
9
jobs :
13
- # id of job, a string that is unique to the "jobs" node above.
14
- drive-ios :
15
- # Creates a build matrix for your jobs. You can define different
16
- # variations of an environment to run each job in.
17
- strategy :
18
- # A set of different configurations of the virtual
19
- # environment.
20
- matrix :
21
- device :
22
- - " iPhone 8 (13.1)"
23
- - " iPhone 11 Pro Max (13.1)"
24
- # When set to true, GitHub cancels all in-progress jobs if any
25
- # matrix job fails.
26
- fail-fast : false
27
- # The type of machine to run the job on.
28
- runs-on : macOS-latest
29
- # Contains a sequence of tasks.
10
+ ios-test :
11
+ runs-on : macos-latest
12
+
13
+ env :
14
+ FLUTTER_CHANNEL : stable
15
+ FLUTTER_VERSION : 3.22.2
16
+
30
17
steps :
31
- # A name for your step to display on GitHub.
32
- - name : " List all simulators"
33
- run : " xcrun instruments -s"
34
- - name : " Start Simulator"
35
- run : |
36
- UDID=$(
37
- xcrun instruments -s |
38
- awk \
39
- -F ' *[][]' \
40
- -v 'device=${{ matrix.device }}' \
41
- '$1 == device { print $2 }'
42
- )
43
- xcrun simctl boot "${UDID:?No Simulator with this name found}"
44
- # The branch or tag ref that triggered the workflow will be
45
- # checked out.
46
- # https://github.com/actions/checkout
47
- - uses : actions/checkout@v1
48
- # Sets up a flutter environment.
49
- # https://github.com/marketplace/actions/flutter-action
50
- - uses : subosito/flutter-action@v1
18
+ - name : Checkout code
19
+ uses : actions/checkout@v2
20
+
21
+ - name : fetch submodules
22
+ run : git submodule update --init --recursive
23
+ - uses : futureware-tech/simulator-action@v3
24
+ with :
25
+ model : ' iPhone 15'
26
+
27
+ - uses : subosito/flutter-action@v2
51
28
with :
52
- channel : ' stable' # or: 'dev' or 'beta'
53
- - name : " Run Flutter Driver tests"
54
- run : " cd example && flutter drive --driver=test_drive/integration_test.dart --target=test/widget_test.dart"
29
+ channel : ' stable'
30
+ - run : cd example && flutter drive --driver=test_drive/integration_test.dart --target=test/widget_test.dart
0 commit comments