forked from qiniu/dart-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (50 loc) · 1.68 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
language: dart
dart:
- stable
install:
- cd $TRAVIS_BUILD_DIR/base && pub get
# - cd $$TRAVIS_BUILD_DIR/flutter && pub get
before_script:
- cd $TRAVIS_BUILD_DIR/base && rm -rf .env
jobs:
include:
#######################################
######### jobs for base #############
#######################################
# 检查 lint 并在 warnings、infos 时报错退出
- stage: base(analyze,format,test)
name: "Analyze"
os: linux
script: cd $TRAVIS_BUILD_DIR/base && dartanalyzer --fatal-warnings --fatal-infos .
# 检查格式并在异常时退出
- stage: base(analyze,format,test)
name: "Format"
os: linux
script: cd $TRAVIS_BUILD_DIR/base && dartfmt -n --set-exit-if-changed .
# 执行测试(已开启 null safe)
- stage: base(analyze,format,test)
name: "Vm Tests"
os: linux
script: cd $TRAVIS_BUILD_DIR/base && pub run test_coverage --print-test-output && bash <(curl -s https://codecov.io/bash)
#######################################
####### jobs for flutter_sdk ##########
#######################################
# - stage: flutter_sdk(analyze,format,test)
# name: "Analyze"
# os: linux
# script: cd $TRAVIS_BUILD_DIR/flutter
# - stage: flutter_sdk(analyze,format,test)
# name: "Format"
# os: linux
# script: cd $TRAVIS_BUILD_DIR/flutter
# - stage: flutter_sdk(analyze,format,test)
# name: "Vm Tests"
# os: linux
# script: cd $TRAVIS_BUILD_DIR/flutter
stages:
- base(analyze,format,test)
# - flutter_sdk(analyze,format,test)
# - flutter_sdk_example(analyze,format,test)
cache:
directories:
- $HOME/.pub-cache