|
5 | 5 | flutter: circleci/flutter@2.0.2 |
6 | 6 | node: circleci/node@5.2.0 |
7 | 7 | advanced-checkout: vsco/advanced-checkout@1.1.0 |
| 8 | + ios: circleci/macos@2.5.4 |
8 | 9 |
|
9 | 10 | commands: |
10 | 11 | setup_flutter: |
|
90 | 91 | steps: |
91 | 92 | - advanced-checkout/shallow-checkout |
92 | 93 | - run: |
93 | | - name: Remove `patrol:` from example/pubspec.yaml |
| 94 | + name: Remove `patrol:` from dev_dependencies in example/pubspec.yaml |
94 | 95 | command: | |
95 | | - sed -i.bak '/^\s*patrol:/d' example/pubspec.yaml |
| 96 | + awk ' |
| 97 | + BEGIN { inside_dev_deps = 0 } |
| 98 | + /^\s*dev_dependencies:/ { inside_dev_deps = 1; print; next } |
| 99 | + /^\s*\S+:/ && inside_dev_deps && !/^ *patrol:/ { |
| 100 | + inside_dev_deps = 0 |
| 101 | + } |
| 102 | + inside_dev_deps && /^\s*patrol:/ { next } |
| 103 | + { print } |
| 104 | + ' example/pubspec.yaml > example/pubspec.cleaned.yaml |
| 105 | + mv example/pubspec.cleaned.yaml example/pubspec.yaml |
96 | 106 | - install_flutter_and_dart_packages: |
97 | 107 | generate_pigeons: true |
98 | 108 | - run: flutter test --coverage |
@@ -126,10 +136,9 @@ jobs: |
126 | 136 | - setup_flutter |
127 | 137 | - setup_patrol |
128 | 138 | - android/start-emulator-and-run-tests: |
129 | | - run-tests-working-directory: example |
130 | 139 | additional-avd-args: --device 3 |
131 | 140 | system-image: system-images;android-33;default;x86_64 |
132 | | - test-command: patrol test -t integration_test/ --verbose |
| 141 | + test-command: cd example && patrol test -t integration_test/ --verbose |
133 | 142 |
|
134 | 143 | test_ios: |
135 | 144 | macos: |
@@ -161,21 +170,8 @@ jobs: |
161 | 170 | - advanced-checkout/shallow-checkout |
162 | 171 | - setup_ios |
163 | 172 | - setup_patrol |
164 | | - - run: |
165 | | - name: Boot First Available Simulator and Print Info |
166 | | - command: | |
167 | | - # Find the first available shutdown simulator |
168 | | - SIM_LINE=$(xcrun simctl list devices available | grep -m1 "Shutdown") |
169 | | - SIM_NAME=$(echo "$SIM_LINE" | awk -F '[()]' '{print $1}' | xargs) |
170 | | - DEVICE_ID=$(echo "$SIM_LINE" | awk -F '[()]' '{print $2}') |
171 | | - |
172 | | - echo "Booting simulator: $SIM_NAME ($DEVICE_ID)" |
173 | | - xcrun simctl boot "$DEVICE_ID" |
174 | | - |
175 | | - sleep 10 |
176 | | - |
177 | | - # Confirm booted device |
178 | | - xcrun simctl list | grep "$DEVICE_ID" |
| 173 | + - ios/preboot-simulator |
| 174 | + - ios/wait-until-simulator-booted |
179 | 175 | - run: |
180 | 176 | name: Run E2E Tests |
181 | 177 | no_output_timeout: 30m |
|
0 commit comments