forked from admob-plus/admob-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
117 lines (111 loc) · 3.77 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
116
117
sudo: false
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- mkdir -p $HOME/.yarn_cache
- cp -f yarn.lock $HOME/.yarn_cache/yarn.lock
cache:
cocoapods: true
yarn: true
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
- $HOME/.yarn_cache
- node_modules
_ios: &_ios
os: osx
osx_image: xcode10.3
jobs:
include:
- stage: first
env: JOB=lint
language: node_js
node_js: 12
install:
- travis_retry yarn
- travis_retry yarn global add @commitlint/travis-cli
script:
- commitlint-travis
- yarn lint
- yarn lerna run prepare --scope=@admob-plus/core --scope=cordova-admob-plus
- pushd packages/cli
- yarn prepack
- popd
- pushd examples/ionic-angular
- yarn
- yarn lint
- popd
- stage: first
env: JOB=deploy-docs
if: branch = master AND type != pull_request
language: node_js
node_js: 13
install:
- travis_retry yarn
- yarn lerna run --scope @admob-plus/core prepare
after_success:
- git config --global user.name "${GH_NAME}"
- git config --global user.email "${GH_EMAIL}"
- echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
- pushd website
- travis_retry yarn
- GIT_USER="${GH_NAME}" yarn publish-gh-pages
- popd
- stage: test
env: PLATFORM=ios-12.0
<<: *_ios
- env: PLATFORM=ios-12.2
<<: *_ios
- env:
- PLATFORM=android-5.1
- ANDROID_ABI=armeabi-v7a
- ANDROID_API_LEVEL=22
language: android
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
- android-$ANDROID_API_LEVEL
- android-$ANDROID_API_LEVEL
- sys-img-$ANDROID_ABI-android-$ANDROID_API_LEVEL
- env:
- PLATFORM=android-4.4
- ANDROID_ABI=armeabi-v7a
- ANDROID_API_LEVEL=19
language: android
android:
components:
- tools
- platform-tools
- tools
- build-tools-27.0.3
- android-$ANDROID_API_LEVEL
- android-$ANDROID_API_LEVEL
- sys-img-$ANDROID_ABI-android-$ANDROID_API_LEVEL
before_install:
- nvm install 12
- test -f $HOME/.yarn_cache/yarn.lock && cp $HOME/.yarn_cache/yarn.lock yarn.lock || true
- travis_retry curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- if [[ "$PLATFORM" =~ android ]]; then android list sdk --extended --no-ui --all; fi
- if [[ "$PLATFORM" =~ android ]]; then android list targets; fi
- if [[ "$PLATFORM" =~ android ]]; then yes | sdkmanager --update &>/dev/null && yes | sdkmanager --licenses &>/dev/null || true; fi
- if [[ "$PLATFORM" =~ android ]]; then sdkmanager --version; fi
- if [[ "$PLATFORM" =~ ios ]]; then pod --version; fi
install:
- travis_retry yarn
- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26,android-27,android-28; fi
- if [[ "$PLATFORM" =~ android ]]; then echo no | android create avd --force -n test -k "system-images;android-$ANDROID_API_LEVEL;default;$ANDROID_ABI" --abi $ANDROID_ABI; fi
- if [[ "$PLATFORM" =~ ios ]]; then pod repo update; fi
- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
# https://github.com/apache/cordova-ios/issues/523
- if [[ "$PLATFORM" =~ android ]]; then yarn lerna exec --no-bail cordova platform rm ios || true; fi
- yarn lerna run prepare
script:
- yarn test
- if [[ "$PLATFORM" =~ android ]]; then yarn test-android; fi
- if [[ "$PLATFORM" =~ ios ]]; then yarn test-ios; fi
- if [[ "$PLATFORM" =~ ios ]]; then pushd packages/cordova/src/ios && swiftlint && popd; fi