updated .cirrus.yml
This commit is contained in:
parent
31c21ff47a
commit
ea2d2cd631
38
.cirrus.yml
38
.cirrus.yml
|
@ -1,4 +1,9 @@
|
|||
task:
|
||||
only_if: $CIRRUS_PR == ''
|
||||
skip: '!changesInclude(".cirrus.yml")'
|
||||
env:
|
||||
ANDROID_EMULATOR_API_LEVEL: 30
|
||||
ANDROID_ABI: "google_apis;x86"
|
||||
# Xcode 12 task
|
||||
osx_instance:
|
||||
image: big-sur-xcode-12.4
|
||||
|
@ -29,7 +34,7 @@ task:
|
|||
# - xcrun simctl list
|
||||
# - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-12 com.apple.CoreSimulator.SimRuntime.iOS-14-4 | xargs xcrun simctl boot
|
||||
# - flutter channel $CHANNEL
|
||||
# - ./test.sh $(ipconfig getifaddr en0)
|
||||
# - ./scripts/test.sh $(ipconfig getifaddr en0)
|
||||
- name: test_plugin_android
|
||||
env:
|
||||
matrix:
|
||||
|
@ -37,19 +42,22 @@ task:
|
|||
#CHANNEL: "dev"
|
||||
#CHANNEL: "beta"
|
||||
#CHANNEL: "stable"
|
||||
create_avd_script:
|
||||
- mkdir -p .android && touch ~/.android/repositories.cfg
|
||||
- sdkmanager --list
|
||||
- sdkmanager "system-images;android-30;google_apis;x86"
|
||||
- (yes || true) | sdkmanager --licenses
|
||||
- OUTPUT_AVD=$(avdmanager create avd --force -n Flutter-Android -k "system-images;android-30;google_apis;x86" --device "Nexus 6P")
|
||||
- echo $OUTPUT_AVD
|
||||
- emulator -list-avds
|
||||
install_images_script:
|
||||
#- mkdir -p .android && touch ~/.android/repositories.cfg
|
||||
#- sdkmanager --list
|
||||
- sdkmanager "system-images;android-$ANDROID_EMULATOR_API_LEVEL;$ANDROID_ABI"
|
||||
#- (yes || true) | sdkmanager --licenses
|
||||
create_device_script:
|
||||
echo no | avdmanager create avd --force -n test -k "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI"
|
||||
start_emulator_background_script:
|
||||
- emulator -avd Flutter-Android -no-audio -no-window
|
||||
$ANDROID_SDK_HOME/emulator/emulator-headless -VERBOSE -avd TEST -no-audio -no-window
|
||||
pub_cache:
|
||||
folder: ~/.pub-cache
|
||||
wait_for_emulator_script:
|
||||
- adb wait-for-device
|
||||
- adb shell input keyevent 82
|
||||
script:
|
||||
- flutter channel $CHANNEL
|
||||
- ./test.sh $(ipconfig getifaddr en0)
|
||||
#- adb wait-for-device
|
||||
- ./scripts/android-wait-for-emulator.sh
|
||||
#- adb shell input keyevent 82
|
||||
flutter_change_channel_script: flutter channel $CHANNEL
|
||||
doctor_script: flutter doctor -v
|
||||
devices_script: flutter devices
|
||||
script: ./scripts/test.sh $(ipconfig getifaddr en0)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set +e
|
||||
|
||||
bootanim=""
|
||||
failcounter=0
|
||||
timeout_in_sec=360
|
||||
|
||||
until [[ "$bootanim" =~ "stopped" ]]; do
|
||||
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &`
|
||||
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline"
|
||||
|| "$bootanim" =~ "running" ]]; then
|
||||
let "failcounter += 1"
|
||||
echo "Waiting for emulator to start: $failcounter of $timeout_in_sec : status: $bootanim"
|
||||
if [[ $failcounter -gt timeout_in_sec ]]; then
|
||||
echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Emulator is ready"
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
readonly SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
readonly PROJECT_DIR="$(dirname $SCRIPT_PATH)"
|
||||
|
||||
function error() {
|
||||
echo "$@" 1>&2
|
||||
}
|
||||
|
@ -8,13 +11,13 @@ function error() {
|
|||
export NODE_SERVER_IP=$1
|
||||
FAILED=0
|
||||
|
||||
dart tool/env.dart
|
||||
dart $PROJECT_DIR/tool/env.dart
|
||||
|
||||
cd nodejs_server_test_auth_basic_and_ssl
|
||||
cd $PROJECT_DIR/nodejs_server_test_auth_basic_and_ssl
|
||||
node index.js &
|
||||
|
||||
flutter clean
|
||||
cd ../example
|
||||
cd $PROJECT_DIR/example
|
||||
flutter clean
|
||||
flutter driver --driver=test_driver/integration_test.dart --target=integration_test/webview_flutter_test.dart
|
||||
|
Loading…
Reference in New Issue