forked from camptocamp/ngeo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
86 lines (75 loc) · 2.17 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
dist: xenial
sudo: false
language: node_js
node_js:
- "10"
notifications:
email: false
env:
global:
- CXX=g++-4.8
- secure: "l/McmiK4djffT04/+5MxW9sy4yO80Rf6vq+nZb5P647A6pXpPLdoRLGo50CtYRiKnFLiChHk2QxUOspeKuIKE+UQAm9dGmyMgfYkj/jwxIBd0YQqavaGzoWo5U1ZSGKeVd3kJlIaUJyLlnKbBOmFCY00c4JLveAagsV53lbephY="
- GIT_REMOTE_NAME=origin
- GITHUB_USERNAME=camptocamp
- CHROME_BIN=/opt/google/chrome/chrome
- DISPLAY=:99.0
- MAIN_BRANCH=master
- CI=true
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- python3-venv
chrome: stable
cache:
apt: true
pip: true
npm: false
before_install:
- python3 --version
- /opt/google/chrome/chrome --version
- git config --global user.name "Travis"
- git config --global user.email "[email protected]"
- buildtools/set-version
install:
- export GIT_BRANCH=${TRAVIS_BRANCH}
- if [ "${TRAVIS_REPO_SLUG}" = "camptocamp/ngeo" -a "${TRAVIS_PULL_REQUEST}" = "false" ]; then export IS_HOME=TRUE; else export IS_HOME=FALSE; fi
- if [ ${IS_HOME} = TRUE ]; then buildtools/travis-decrypt.sh; fi
- git fetch origin ${TRAVIS_BRANCH}:${TRAVIS_BRANCH}
- git config --add diff.renamelimit 0
before_script:
- export PACKAGE_VERSION=`buildtools/get-version.sh version`
- echo "_auth = ${NPM_AUTH}" > ~/.npmrc
- echo "email = [email protected]" >> ~/.npmrc
script:
# Fix:
# UnhandledPromiseRejectionWarning: Error: ENOSPC: System limit for number of file watchers reached
- echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
# Lint
- make lint
- make spell
- make check-examples-checker
- make test
# Webpack build of ngeo/gmf examples and gmf apps
- if [ "${TRAVIS_PULL_REQUEST}" = false ]; then export NODE_ENV=production; fi
- make examples-hosted
- make check-examples
#- npm run typecheck
# Generate API doc
- "! (npm run typecheck|grep -v '^node_modules/'|grep '^[a-z]')"
- npm run doc
- npm run build-api
deploy:
- provider: script
skip_cleanup: true
script: buildtools/travis-deploy.sh
on:
repo: camptocamp/ngeo
all_branches: true
notifications:
email:
recipients:
if: branch = env(MAIN_BRANCH)