This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
/
.travis.yml
121 lines (113 loc) · 3.34 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
118
119
120
121
# +++ TRAVIS-FILE for https://github.com/geli-lms/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.13"
addons:
apt:
sources:
- google-chrome
packages:
# manually update dependencies for chrome
- libfontconfig1
- libstdc++6
- lsb-base
# used for frontend e2e tests
- google-chrome-stable
- rsync
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:
- "$HOME/.npm"
stages:
- test
- name: deploy
if: type = push AND (branch IN (develop, master) OR tag IS present)
jobs:
include:
- stage: test
name: "Tests Api"
install:
- ${TRAVIS_BUILD_DIR}/.travis/changelog.sh
- cd ${TRAVIS_BUILD_DIR}/.travis
- npm ci
- cd ${TRAVIS_BUILD_DIR}/api
- npm ci
- ${TRAVIS_BUILD_DIR}/.travis/license-crawler.sh
script:
- npm run lint
- npm run test
- npm run apidoc
after_script:
- cd ${TRAVIS_BUILD_DIR}
- .travis/coveralls.sh
- stage: test
name: "Tests Frontend"
before_install:
- export NODE_OPTIONS=--max_old_space_size=4096
install:
- ${TRAVIS_BUILD_DIR}/.travis/changelog.sh
- cd ${TRAVIS_BUILD_DIR}/.travis
- npm ci
- cd ${TRAVIS_BUILD_DIR}/api
- npm ci
- cd ${TRAVIS_BUILD_DIR}/app/webFrontend
- npm ci
- ${TRAVIS_BUILD_DIR}/.travis/license-crawler.sh
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- cd ${TRAVIS_BUILD_DIR}/api
- npm run load:fixtures
- npm start &
- cd ${TRAVIS_BUILD_DIR}/app/webFrontend
- npm run lint
- npm run e2e
- npm run build
- stage: deploy
before_install:
- export NODE_OPTIONS=--max_old_space_size=4096
install:
- cd ${TRAVIS_BUILD_DIR}/.travis
- npm ci
- cd ${TRAVIS_BUILD_DIR}/api
- npm ci
- sed -i 's/$TRAVIS_COMMIT/'$TRAVIS_COMMIT'/' src/server.ts
- cd ${TRAVIS_BUILD_DIR}/app/webFrontend
- npm ci
- sed -i 's/$TRAVIS_COMMIT/'$TRAVIS_COMMIT'/' src/app/shared/services/raven-error-handler.service.ts
- ${TRAVIS_BUILD_DIR}/.travis/license-crawler.sh
script:
- cd ${TRAVIS_BUILD_DIR}/api
- npm run build
- cd ${TRAVIS_BUILD_DIR}/app/webFrontend
- npm run build
after_success:
- cd ${TRAVIS_BUILD_DIR}
- .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