Skip to content

Commit

Permalink
Fixed integration test on linux (#21)
Browse files Browse the repository at this point in the history
* Added master branch on linux and macos to test code coverage

* Fix build problem on linux

* Fixed build for beta v0.11.7

* Released pin to v0.9.4 to build on v0.11.7

* Increased timeout on integration test

* Removed allow failure on unit test on beta on osx
Removed allow failure on integration test on linux
Added allow failure on unit test on dev

* Added unit/widget tests and moved integration tests to stable channel

* Upgrade to Flutter v1.2.1

* Merge branch 'master' into dev

# Conflicts:
#	.travis.yml

* Fixed syntax

* Fixed using pre-compiled flutter

* Fixed download by channel

* Reverted to compiling on master branch

* Added android sdk tools and platform required by flutter and emulator

* Added android sdk tools and platform required by emulator
Skipped homebrew update

* Added check to only install code coverage on linux os and stable channel

* Fixed parsing

* Refeshed project to current expected build files

* Bypassed unit tests

* Replaced unit tests

* Fixed master branch name

* Released v0.1.3

* Fixed integration test on linux

* Skipped unit tests for now

* Globalized flutter version

* Setup flutter version as global

* Upgraded to current flutter version and re-enabled unit tests

* Installed required android dependencies for flutter on linux
  • Loading branch information
mmcc007 authored May 31, 2019
1 parent 8ab3fa8 commit dea451b
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
env:
global:
- channel=stable
- FLUTTER_VERSION=1.5.4-hotfix.2

jobs:
include:

Expand All @@ -10,7 +15,7 @@ jobs:
- sudo apt-get install -y --no-install-recommends lib32stdc++6 libstdc++6 > /dev/null
before_script:
# install pre-compiled flutter
- FLUTTER_VERSION=1.2.1-${channel}
- FLUTTER_VERSION=$FLUTTER_VERSION-${channel}
- |
if [ $TRAVIS_OS_NAME == "osx" ]; then
wget --quiet --output-document=flutter.zip https://storage.googleapis.com/flutter_infra/releases/${channel}/macos/flutter_macos_v${FLUTTER_VERSION}.zip && unzip -qq flutter.zip > /dev/null && rm flutter.zip
Expand Down Expand Up @@ -94,6 +99,16 @@ jobs:
# Platform tools
- sdkmanager "emulator" "tools" "platform-tools" > /dev/null
- sdkmanager --list | head -15

# Download a pinned version of the emulator since upgrades can cause issues
- ${ANDROID_HOME}/emulator/emulator -version
- emulator_version=5264690 # 29.0.9.0 (build_id 5537588) ==> 28.0.23.0 (build_id 5264690)
- curl -fo emulator.zip "https://dl.google.com/android/repository/emulator-linux-$emulator_version.zip"
- rm -rf "${ANDROID_HOME}/emulator"
- unzip -q emulator.zip -d "${ANDROID_HOME}"
- rm -f emulator.zip
- ${ANDROID_HOME}/emulator/emulator -version

# install older packages (for emulator)
- sdkmanager "build-tools;25.0.2" "platforms;android-25" > /dev/null
# Create and start emulator.
Expand All @@ -103,15 +118,16 @@ jobs:
- sdkmanager --list | head -15
- echo no | avdmanager create avd --force -n test -k "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI"
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window -gpu swiftshader &

# install pre-compiled flutter
- sudo apt-get install -y --no-install-recommends lib32stdc++6 libstdc++6 > /dev/null
- sdkmanager "platforms;android-28" "build-tools;28.0.3" > /dev/null # required by flutter
- channel=stable
- FLUTTER_VERSION=1.2.1-${channel}
- FLUTTER_VERSION=$FLUTTER_VERSION-${channel}
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/flutter_linux_v${FLUTTER_VERSION}.tar.xz && tar xf flutter.tar.xz > /dev/null && rm flutter.tar.xz
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- export PATH=$PWD/flutter/bin:$PWD/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor -v

# Wait for emulator to finish startup.
- ./scripts/android-wait-for-emulator.sh
- adb shell input keyevent 82
Expand All @@ -133,9 +149,9 @@ jobs:
- brew install ios-deploy
- brew install cocoapods || echo 'ignore exit(1)'
- brew link --overwrite cocoapods

# install pre-compiled flutter
- channel=stable
- FLUTTER_VERSION=1.2.1-${channel}
- FLUTTER_VERSION=$FLUTTER_VERSION-${channel}
- wget --quiet --output-document=flutter.zip https://storage.googleapis.com/flutter_infra/releases/${channel}/macos/flutter_macos_v${FLUTTER_VERSION}.zip && unzip -qq flutter.zip > /dev/null && rm flutter.zip
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- export PATH=$PWD/flutter/bin:$PWD/flutter/bin/cache/dart-sdk/bin:$PATH
Expand All @@ -151,5 +167,6 @@ jobs:


allow_failures:
- env: channel=beta
- env: channel=dev
- env: branch=master

0 comments on commit dea451b

Please sign in to comment.