-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (76 loc) · 3.03 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
# IMPORTANT: DO NOT EDIT - THIS FILE IS GENERATED form ./travis-setup/travis-template.yml
# Please update .travis.yml for global updates and ./travis-setup
# for updates related to encrypting files
# Encrypting environment variables for travis:
# https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml
# https://docs.travis-ci.com/user/encryption-keys/#usage
# https://docs.travis-ci.com/user/encryption-keys/#detailed-discussion
# Encrypting files for travis:
# https://docs.travis-ci.com/user/encrypting-files/
sudo: true
jobs:
include:
- stage: Build for Angular (front-end)
language: node_js
node_js:
- "10"
dist: trusty
# https://docs.travis-ci.com/user/chrome
addons:
chrome: stable
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-chrome-addon-in-the-headless-mode
# start your web application and listen on `localhost`
before_install:
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
- N | npm install -g @angular/cli
install:
- npm install
script:
- ng build --prod # --prod will catch errors with angular bindings to view using codelyzer
- ng test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
- ng e2e -- --protractor-config=e2e/protractor-ci.conf.js
cache:
directories:
- node_modules
- stage: Build for Client API (back-end, decrypts and downloads secrets)
language: node_js
node_js:
- '10'
before_install:
- openssl aes-256-cbc -K $encrypted_e19a001b01f5_key -iv $encrypted_e19a001b01f5_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar # extract files in root
# - ls ; cd .credentials ; ls ; cd dev ; ls
install:
- cd apis/client
- npm i -g typescript tsoa mocha ts-node # install global dependencies
- npm i # install project dependencies
script:
# - pwd
# - ls
- tsoa routes
- tsoa swagger
- tsc -p tsconfig.client-api.dev-build.json
- cd ${TRAVIS_BUILD_DIR} # back to root
- sh apis/client/test.sh
cache:
directories:
- node_modules
- stage: Build for Admin API (back-end, encrypts and uploads secrets)
language: node_js
node_js:
- '10'
before_install:
- openssl aes-256-cbc -K $encrypted_e19a001b01f5_key -iv $encrypted_e19a001b01f5_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
install:
- cd apis/admin
- npm i -g typescript tsoa mocha ts-node # install global dependencies
- npm i # install project dependencies
script:
- tsc -p tsconfig.admin-api.dev-build.json
- npm run test
- cd ${TRAVIS_BUILD_DIR} # back to root
- sh apis/admin/test.sh
cache:
directories:
- node_modules