-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
52 lines (52 loc) · 2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
jobs:
include:
- language: android
sudo: false
jdk: oraclejdk8
cache:
directories:
- $HOME/.pub-cache
os:
- linux
addons:
apt:
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
sources:
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
packages:
- libstdc++6
- fonts-droid
- lcov
before_install:
- mkdir -p ~/.android
- touch ~/.android/repositories.cfg
- cd example_redux
- echo yes | sdkmanager "tools" >/dev/null
- echo yes | sdkmanager "platform-tools" >/dev/null
- echo yes | sdkmanager "build-tools;29.0.2" >/dev/null
- echo yes | sdkmanager "platforms;android-26" >/dev/null
- echo yes | sdkmanager "platforms;android-28" >/dev/null
- echo yes | sdkmanager "platforms;android-29" >/dev/null
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
- echo y | sdkmanager "extras;google;m2repository" >/dev/null
- sdkmanager --list
- cd ..
install:
- git clone https://github.com/flutter/flutter.git -b stable --depth 1
- ./flutter/bin/flutter doctor -v
- gem install coveralls-lcov
before_script:
- ./flutter/bin/flutter pub get
- cd example_redux
- ../flutter/bin/flutter pub get
- ../flutter/bin/flutter pub run build_runner build
script:
- ../flutter/bin/flutter -v build apk
- ../flutter/bin/flutter test --coverage
- cd ..
- sed -i 's/SF:lib\\/SF:example_redux\\lib\\/' example_redux/coverage/lcov.info
- sed -i 's/SF:lib\//SF:example_redux\/lib\//' example_redux/coverage/lcov.info
- ./flutter/bin/flutter test --coverage
- lcov -a example_redux/coverage/lcov.info -a coverage/lcov.info -o total.info
after_success:
- coveralls-lcov total.info