1- name : all_plugins
1+ name : packages (all)
22
33on :
44 push :
@@ -72,22 +72,82 @@ jobs:
7272 - name : " Run unittest"
7373 run : melos run unittest
7474
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"
75128
76- integration_test :
77- name : Integration test
129+ android_integration_test :
130+ name : integration test (Android)
131+ needs : [analyze, test, ios_integration_test]
78132 timeout-minutes : 60
79133 runs-on : macos-latest
80134 steps :
81135 - 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
82144
83145 - name : Set up Java version
84146 uses : actions/setup-java@v1
85147 with :
86148 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
91151
92152 - name : " Install Tools"
93153 run : |
@@ -105,15 +165,13 @@ jobs:
105165
106166 - name : " Start dev server"
107167 working-directory : example/server
108- run : npm install && (npm run start:dev &)
168+ run : yarn install && (yarn start:dev &)
109169
110170 - name : " Set IP address"
111171 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
117175
118176 - name : " Run integration test Android"
119177 uses : reactivecircus/android-emulator-runner@v2
@@ -123,12 +181,4 @@ jobs:
123181 script : |
124182 sleep 15;
125183 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