Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add e2e testing Activate KVM Add KVM checks Update .cirrus.yml
- Loading branch information
Guillaume Bernos
committed
Feb 18, 2020
1 parent
be4a800
commit 37980ef
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM cirrusci/flutter:stable | ||
|
||
RUN sudo apt-get update -y | ||
|
||
RUN sudo apt-get install -y --no-install-recommends gnupg | ||
|
||
# Add repo for gcloud sdk and install it | ||
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \ | ||
sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | ||
|
||
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \ | ||
sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - | ||
|
||
RUN sudo apt-get update && sudo apt-get install -y google-cloud-sdk && \ | ||
gcloud config set core/disable_usage_reporting true && \ | ||
gcloud config set component_manager/disable_update_check true | ||
|
||
RUN yes | sdkmanager \ | ||
"platforms;android-29" \ | ||
"build-tools;29.0.0" \ | ||
"system-images;android-29;default;x86" \ | ||
"extras;google;m2repository" \ | ||
"extras;android;m2repository" | ||
|
||
RUN yes | sdkmanager --licenses | ||
|
||
# Add repo for Google Chrome and install it | ||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list | ||
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends google-chrome-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
container: | ||
dockerfile: .ci/Dockerfile | ||
kvm: true | ||
|
||
task: | ||
upgrade_script: | ||
- flutter channel stable | ||
- flutter upgrade | ||
- flutter channel master | ||
- flutter upgrade | ||
- git fetch origin master | ||
activate_script: pub global activate flutter_plugin_tools | ||
matrix: | ||
- name: analyze | ||
test_script: | ||
- flutter analyze | ||
- name: test | ||
env: | ||
matrix: | ||
CHANNEL: "master" | ||
CHANNEL: "stable" | ||
test_script: | ||
- flutter channel $CHANNEL | ||
- flutter test | ||
- name: e2e | ||
env: | ||
matrix: | ||
CHANNEL: "master" | ||
CHANNEL: "stable" | ||
accel_check_script: | ||
- sudo chown cirrus:cirrus /dev/kvm | ||
- $ANDROID_HOME/emulator/emulator -accel-check | ||
create_device_script: | ||
echo no | avdmanager create avd --force | ||
-n test | ||
-k "system-images;android-29;default;x86" | ||
start_emulator_background_script: | ||
$ANDROID_HOME/emulator/emulator | ||
-avd test | ||
-no-audio | ||
-no-window | ||
wait_for_emulator_script: | ||
- adb wait-for-device | ||
test_script: | ||
- flutter channel $CHANNEL | ||
- cd example | ||
- flutter build apk | ||
- cd android | ||
- ./gradlew app:connectedAndroidTest -Ptarget=`pwd`/../../test/location_e2e.dart |