-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (93 loc) · 4.27 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
language: node_js
node_js:
- '11.14' #TODO: change it to 'node' once Travis supports the newest version
dist: trusty
cache:
directories:
- $TRAVIS_BUILD_DIR/client/public
- $TRAVIS_BUILD_DIR/core/public
- $TRAVIS_BUILD_DIR/core/examples/luigi-sample-angular/dist
- $TRAVIS_BUILD_DIR/cypress-binary-cache
- $HOME/.cache/Cypress
notifications:
slack:
secure: wiOchVgoiKNUikjCeIhsuv3Y5jolFud6ercdZdO3+JigQqkmoAC95f2jKTYEdplJWyJr8JY6z0+UJNceHyr5YJx/l1wpm6Zq+3H4dq/V0yUXH1uhw2eaTzweX2vjfw0bzewEdc1CGl4kSfdyTajnbKgt+mtnrAV9lPqiXYSOOJTu5BCFomi7u2GhAz1JjBK6P4Ar2jXm+oc81nYjj40P8bZFlA7Rjm0hNN42MMkKvnD8OHztL3EwezKHXlQW7fN4eOrhPOMbT3NRU72g9Nir+lfoKJlch1zPoHXQ7DRp41uGyHV/qfvfRLzXwxftZK6kdvzMe0eI0i1aIm0R6AE0bLphB2o/klJzyQpqSiQgETTH0qJN+3px2kddGrw7Me+UNC/1zZrt1MJfWf0h6WjXTsPDJf3ajLsn8OoIeBTRZbAb9as3UWQZcknuuMf8oGUzZkrZNMWYqo3py0+qWm4wSbWXWVUCgVAIYA6oEADwq37z59HySGkyHI4gEPzxsYODfCuvO4pJX1h4vEyH7w2IigwhDAPq5G4Vdez9ZFS96p/LSCF+iH8yWMy294u8wk5ofWUutFFv0JC45LQBXu51a2TeQkalwVn4DiuxxHE6jZieREw75YFjra4jpWsyziWkzshGT75NCra6cKAbNa4T8n6Pm3ogjEPeeWAO3psgSdo=
jobs:
include:
- stage: 'Precache & Unit Tests'
script:
- export CYPRESS_CACHE_FOLDER=$TRAVIS_BUILD_DIR/cypress-binary-cache
- npm i -g lerna
- lerna bootstrap --ci --ignore "*luigi-example-vue" || travis_terminate 1
- lerna run bundle --ignore "*luigi-example-vue" || travis_terminate 1
- lerna run bundlesizeOnly --ignore "*luigi-example-vue" || travis_terminate 1
- ls -lah $TRAVIS_BUILD_DIR/core/examples/luigi-sample-angular/node_modules/@kyma-project
- cat $TRAVIS_BUILD_DIR/core/examples/luigi-sample-angular/node_modules/@kyma-project/luigi-client/package.json
- lerna run build --ignore "*luigi-example-vue" || travis_terminate 1
- npm test --prefix core || travis_terminate 1
- du -sh
before_cache:
- rm -rf ~/.npm/_logs
- rm -rf ~/.npm/_cacache
- rm -rf $TRAVIS_BUILD_DIR/website
- rm -rf $TRAVIS_BUILD_DIR/core/examples/luigi-example-vue
#----- DOCU -----
- stage: 'Documentation & Tests'
name: 'Check Documentation'
script:
- cd $TRAVIS_BUILD_DIR/scripts && npm ci
- cd $TRAVIS_BUILD_DIR && bash ./scripts/docuCheck.sh
before_cache:
- rm -rf ~/.npm/_logs
- rm -rf ~/.npm/_cacache
#----- WHITESOURCE -----
- name: 'Whitesource check'
if: repo = SAP/luigi AND (branch = master)
script:
- 'if [ ! -z "${WHITESOURCE_APIKEY}" ]; then
npm --prefix ./website/landingpage/dev install ./website/landingpage/dev;
npm --prefix ./website/fiddle install ./website/fiddle;
lerna bootstrap --ci --ignore "*luigi-example-vue";
npm i -g whitesource;
bash ./scripts/whiteSource.sh;
fi'
before_cache:
- rm -rf ~/.npm/_logs
- rm -rf ~/.npm/_cacache
#----- UNIT -----
# - name: 'Unit Tests'
# script:
# - echo 'core' && ls core/node_modules | wc -l && echo 'client' && ls client/node_modules | wc -l
# - npm test --prefix core
# before_cache:
# - rm -rf ~/.npm/_logs
# - rm -rf ~/.npm/_cacache
# ----- INTEGRATION -----
- &integration-testing
name: 'Integration Testing'
script:
- export CYPRESS_CACHE_FOLDER=$TRAVIS_BUILD_DIR/cypress-binary-cache
# - npm i -g cypress cypress-plugin-retries sirv-cli
- bash ./test/e2e.sh
addons:
chrome: stable
before_install:
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
before_cache:
- rm -rf ~/.npm/_logs
- rm -rf ~/.npm/_cacache
- rm -rf ~/.cache/Cypress/cy/production/browsers #it is individual for each run anyway so caching it slows down the job
- <<: *integration-testing
- <<: *integration-testing
# - <<: *integration-testing
# ----- NPM PUBLISH -----
- stage: 'Publish'
name: 'Publish to NPM'
# run only when merging from release-v branch to master
# if: repo = SAP/luigi AND head_branch ~= ^release-v
if: repo = SAP/luigi AND (branch = master OR branch ~= ^release-v)
script:
- bash ./scripts/npmPublish.sh
before_cache:
- rm -rf ~/.npm/_logs
- rm -rf ~/.npm/_cacache