1
- name : all_plugins
1
+ name : packages (all)
2
2
3
3
on :
4
4
push :
@@ -72,22 +72,82 @@ jobs:
72
72
- name : " Run unittest"
73
73
run : melos run unittest
74
74
75
+ ios_integration_test :
76
+ name : integration test (iOS)
77
+ needs : [analyze, test]
78
+ timeout-minutes : 60
79
+ runs-on : macos-latest
80
+ steps :
81
+ - uses : actions/checkout@v2
82
+ - uses : subosito/flutter-action@v2
83
+ with :
84
+ cache : true
85
+ - uses : actions/setup-node@v3
86
+ with :
87
+ node-version : 16
88
+ cache : ' yarn'
89
+ cache-dependency-path : example/server/yarn.lock
90
+ - name : Cache pods
91
+ uses : actions/cache@v2
92
+ with :
93
+ path : example/iOS/Pods
94
+ key : ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
95
+ restore-keys : |
96
+ ${{ runner.os }}-pods-
97
+ - name : " Install Tools"
98
+ run : |
99
+ ./.github/workflows/scripts/install-tools.sh
100
+
101
+ - name : " Bootstrap Workspace"
102
+ run : melos bootstrap
103
+
104
+ - name : " Set env keys"
105
+ env :
106
+ STRIPE_PUBLISHABLE_KEY : ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
107
+ STRIPE_SECRET_KEY : ${{ secrets.STRIPE_SECRET_KEY }}
108
+ run : |
109
+ ./.github/workflows/scripts/env-files.sh
110
+
111
+ - name : " Start dev server"
112
+ working-directory : example/server
113
+ run : yarn install && (yarn start:dev &)
114
+
115
+ - name : " Set IP address"
116
+ working-directory : example
117
+ run : |
118
+ echo "const kApiUrl='''$(ifconfig | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}')''';" > integration_test/ip.dart
119
+ cat integration_test/ip.dart
120
+
121
+ - name : " Start iOS Simulator"
122
+ run : |
123
+ xcrun simctl boot "iPhone 13 mini"
124
+
125
+ - name : " Run Flutter Driver tests on iOS"
126
+ working-directory : example
127
+ run : " flutter drive --driver test_driver/integration_test.dart --target=integration_test/run_all_tests.dart"
75
128
76
- integration_test :
77
- name : Integration test
129
+ android_integration_test :
130
+ name : integration test (Android)
131
+ needs : [analyze, test, ios_integration_test]
78
132
timeout-minutes : 60
79
133
runs-on : macos-latest
80
134
steps :
81
135
- uses : actions/checkout@v2
136
+ - uses : subosito/flutter-action@v2
137
+ with :
138
+ cache : true
139
+ - uses : actions/setup-node@v3
140
+ with :
141
+ node-version : 16
142
+ cache : ' yarn'
143
+ cache-dependency-path : example/server/yarn.lock
82
144
83
145
- name : Set up Java version
84
146
uses : actions/setup-java@v1
85
147
with :
86
148
java-version : ' 11'
87
-
88
- - uses : subosito/flutter-action@v2
89
- with :
90
- channel : ' stable'
149
+ - name : Setup Gradle
150
+ uses : gradle/gradle-build-action@v2
91
151
92
152
- name : " Install Tools"
93
153
run : |
@@ -105,15 +165,13 @@ jobs:
105
165
106
166
- name : " Start dev server"
107
167
working-directory : example/server
108
- run : npm install && (npm run start:dev &)
168
+ run : yarn install && (yarn start:dev &)
109
169
110
170
- name : " Set IP address"
111
171
working-directory : example
112
- run : echo "const kApiUrl='''$(ifconfig | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}')''';" > integration_test/ip.dart
113
-
114
- - name : " Print ip.dart"
115
- working-directory : example
116
- run : cat integration_test/ip.dart
172
+ run : |
173
+ echo "const kApiUrl='''$(ifconfig | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}')''';" > integration_test/ip.dart
174
+ cat integration_test/ip.dart
117
175
118
176
- name : " Run integration test Android"
119
177
uses : reactivecircus/android-emulator-runner@v2
@@ -123,12 +181,4 @@ jobs:
123
181
script : |
124
182
sleep 15;
125
183
flutter drive --driver test_driver/integration_test.dart --target=integration_test/run_all_tests.dart;
126
- cd android && ./gradlew :app:connectedDebugAndroidTest;
127
-
128
- - name : " Start iOS Simulator"
129
- run : |
130
- xcrun simctl boot "iPhone 13 mini"
131
-
132
- - name : " Run Flutter Driver tests on iOS"
133
- working-directory : example
134
- run : " flutter drive --driver test_driver/integration_test.dart --target=integration_test/run_all_tests.dart"
184
+ cd android && ./gradlew :app:connectedDebugAndroidTest;
0 commit comments