forked from geli-lms/geli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
107 lines (96 loc) · 3.13 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
# +++ TRAVIS-FILE for https://github.com/h-da/geli +++
# required for chrome to install
dist: trusty
# required for e2e tests to complete successfully (page crash???)
sudo: required
language: node_js
node_js:
- "10.4.1"
addons:
apt:
sources:
- google-chrome
packages:
# manually update dependencies for chrome
- libfontconfig1
- libstdc++6
- lsb-base
# used for frontend e2e tests
- google-chrome-stable
services:
- mongodb
- docker
branches:
only:
- develop
- master
# This matches tags wit a format of v{MAJOR}.{MINOR}.{FIX} were major, minor and fix is supposed to be a number.
- /^v(\d+).(\d+).(\d+)$/
cache:
directories:
- api/node_modules
- app/webFrontend/node_modules
- .travis/node_modules
before_script:
# required for chrome to start properly
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# required for MongoDB to have time to start up
- sleep 15
install:
# install api and return back to root for following steps
- cd api
- npm install
- npm prune # remove not (anymore) in package.json required packages (to keep the cache clean)
- cd ..
# install frontend and return back to root for following steps
- cd app/webFrontend
- npm install
- npm prune # remove not (anymore) in package.json required packages (to keep the cache clean)
- cd ../..
# install travis dependencies
- cd .travis
- npm install
- npm prune # remove not (anymore) in package.json required packages (to keep the cache clean)
- cd ..
script:
# check for change in changelog
- .travis/changelog.sh
# check for versions
- .travis/check-version.sh
# run license checker and write license.json / dependencies.ts
- .travis/license-crawler.sh
# run backend-tests and return back to root for following steps
- cd api
- sed -i 's/$TRAVIS_COMMIT/'$TRAVIS_COMMIT'/' src/server.ts
- npm run test # run backend test
- cd ..
- .travis/apidoc-check.sh
# run frontend-tests and return back to root for following steps
- cd app/webFrontend
- npm run lint # run linter
# - npm run test-ci || true # run test - many tests are broken
- npm run e2e # run end-to-end-tests
- sed -i 's/$TRAVIS_COMMIT/'$TRAVIS_COMMIT'/' src/app/shared/services/raven-error-handler.service.ts
- cd ../..
# - travis_wait 30 .travis/build-fe.sh # build in prod mode
- .travis/build-fe.sh # build in prod mode
after_script:
# send required files to coveralls.io
- .travis/coveralls.sh
after_success:
- .travis/package-checker.sh
- .travis/apidoc.sh
- .travis/docker.sh
- .travis/deploy.sh
- .travis/sentry.sh
# Configure notification
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/0624f63ff4c4c3705162
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
on_cancel: always # options: [always|never|change] default: always
on_error: always # options: [always|never|change] default: always