This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
115 lines (106 loc) · 4.69 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Created with package:mono_repo v1.2.1
language: dart
jobs:
include:
- stage: analyzer_and_format
name: "SDK: dev - DIR: src - TASKS: [dartfmt -n --set-exit-if-changed ., dartanalyzer --fatal-infos --fatal-warnings .]"
script: ./tool/travis.sh dartfmt dartanalyzer_0
env: PKG="src"
dart: dev
- stage: analyzer_and_format_stable
name: "SDK: stable - DIR: src - TASKS: [dartfmt -n --set-exit-if-changed ., dartanalyzer --fatal-warnings .]"
script: ./tool/travis.sh dartfmt dartanalyzer_1
env: PKG="src"
dart: stable
- stage: unit_test
name: "SDK: stable - DIR: src - TASKS: pub run test"
script: ./tool/travis.sh dart_test
env: PKG="src"
dart: stable
- stage: unit_test
name: "SDK: 2.7.2 - DIR: src - TASKS: pub run test"
script: ./tool/travis.sh dart_test
env: PKG="src"
dart: "2.7.2"
- stage: unit_test
name: "SDK: dev - DIR: src - TASKS: pub run test"
script: ./tool/travis.sh dart_test
env: PKG="src"
dart: dev
- stage: example_unit_test_and_analyzer
name: "FLUTTER_SDK: 1.12.13+hotfix.9-stable - DIR: example - TASKS: [dartfmt -n --set-exit-if-changed ., dartanalyzer --fatal-infos --fatal-warnings ., flutter test]"
language: generic
os: linux
env: PKG="example"
before_script:
- sudo apt-get install -y --no-install-recommends lib32stdc++6 libstdc++6 > /dev/null
# install pre-compiled flutter
- FLUTTER_CHANNEL=stable
- FLUTTER_VERSION=1.12.13+hotfix.9-${FLUTTER_CHANNEL}
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/${FLUTTER_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
script:
- ./tool/travis.sh dartfmt dartanalyzer_0
- ./tool/travis.sh dartfmt dartanalyzer_1
- ./tool/travis.sh flutter_test
cache:
directories:
- $HOME/.pub-cache
- stage: test_coverage
name: "FLUTTER_SDK: 1.12.13+hotfix.9-stable - DIR: . - TASKS: run_tests"
language: generic
os: linux
env: PKG="."
before_script:
- sudo apt-get install -y --no-install-recommends lib32stdc++6 libstdc++6 > /dev/null
# install pre-compiled flutter
- FLUTTER_CHANNEL=stable
- FLUTTER_VERSION=1.12.13+hotfix.9-${FLUTTER_CHANNEL}
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/${FLUTTER_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
- pub global activate coverage
script:
- ./tool/travis_flutter.sh
after_success: bash <(curl -s https://codecov.io/bash) -f lcov.info
- stage: example_integration_test
name: "FLUTTER_SDK: 1.12.13+hotfix.9-stable - DIR: example - TASKS: flutter driver --target=test_driver/app.dart"
os: osx
osx_image: xcode11.3
xcode_destination: platform=iOS Simulator,OS=13.2,name=iPhone X
env: PKG="example"
# Run integration tests on ios
before_install:
- open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
- export HOMEBREW_NO_AUTO_UPDATE=1
- brew install libimobiledevice
- brew install ideviceinstaller
- brew install ios-deploy
- brew install cocoapods || echo 'ignore exit(1)'
- brew link --overwrite cocoapods
# install pre-compiled flutter
- FLUTTER_CHANNEL=stable
- FLUTTER_VERSION=1.12.13+hotfix.9-${FLUTTER_CHANNEL}
- wget --quiet --output-document=flutter.zip https://storage.googleapis.com/flutter_infra/releases/${FLUTTER_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
- flutter doctor -v
- flutter devices
script: ./tool/travis.sh flutter_test_driver
stages:
- analyzer_and_format
- analyzer_and_format_stable
- unit_test
- example_unit_test_and_analyzer
- example_integration_test
- test_coverage
# Only building master means that we don't run two builds for each pull request.
branches:
only:
- master
cache:
directories:
- "$HOME/.pub-cache"