forked from juice-shop/juice-shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (111 loc) · 3.74 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
dist: xenial
language: node_js
os:
- linux
- osx
- windows
node_js:
- 12
- 10
- 13
stages:
- lint
- test
- integration
env:
global:
secure: KBx27d+h4Aa1vsRG1/gBxIFgee5N4Ln9rf1hmCcpHYp+9A+qspXpJRGm8Loy1dF+NhfY0POnQshAzOgG2isv7/CnNIJmWjHLXwqNvMkKpl2EDbl7EGBGByjvR9K9A84rn7BJJAEsb0/6NNofLhvhheL5mxd1SYvdlbewYeyg3dU=
addons:
chrome: stable
install: if [[ -z "$TRAVIS_TAG" ]]; then npm install; fi
script: if [[ -z "$TRAVIS_TAG" && "$TRAVIS_OS_NAME" != "windows" ]]; then NODE_ENV=test npm test; fi
before_deploy:
- rm -rf node_modules
- rm -rf frontend/node_modules
- npm install --production
- npm run package
deploy:
- provider: releases
overwrite: true
api_key:
secure: fHybcH65ZdS5ITVKH2tIVBITVSiRQJ1AuWqLP16gyAz5pdmWbLM5gA/74zCozanRmuB+7pGFbhDNm075JWoEDVrWSFDLnNiXvfgUYa4oVEiWZlLvOfSARaU3AQPlVvFVhIbG9SA5IEwTtNFbyHjqLjGn/DSBpiIDqqxhF57vw7Q=
file: dist/*
skip_cleanup: true
file_glob: true
draft: true
tag_name: "$TRAVIS_TAG"
on:
repo: bkimminich/juice-shop
tags: true
jobs:
include:
- stage: lint
if: tag IS blank
install: npm i -g standard@14 && cd frontend && npm install && cd ..
script: npm run lint
- stage: integration
if: tag IS blank
os: linux
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
> ./cc-test-reporter
- chmod +x ./cc-test-reporter
script:
- export NODE_ENV=test
- npm test
- npm run frisby
after_success:
- "./cc-test-reporter format-coverage -t lcov -o build/reports/coverage/codeclimate.frontend.json build/reports/coverage/frontend-tests/lcov.info"
- "./cc-test-reporter format-coverage -t lcov -o build/reports/coverage/codeclimate.server.json build/reports/coverage/server-tests/lcov.info"
- "./cc-test-reporter format-coverage -t lcov -o build/reports/coverage/codeclimate.api.json build/reports/coverage/api-tests/lcov.info"
- "./cc-test-reporter sum-coverage build/reports/coverage/codeclimate.*.json -p 3"
- "./cc-test-reporter upload-coverage"
- stage: e2e
if: tag IS blank
os: linux
script:
- export NODE_ENV=test
- npm run protractor
- stage: smoke
if: tag IS blank
os: linux
before_install:
- chmod +x test/smoke/smoke-test.sh
install:
- npm install --production
- npm run package
script:
- cd dist
- tar -zxf juice-shop-*.tgz
- cd juice-shop_*
- npm start &
- ../../test/smoke/smoke-test.sh http://localhost:3000
- stage: deploy
if: "(branch = master OR branch = develop) AND NOT type = pull_request"
os: linux
node_js: 12
install: skip
script: skip
deploy:
- provider: heroku
api_key:
secure: faVT3Ne/O7lVo0+pTm6RcXss0ivvSoODaxMkiVwdpk/51/EsRd4+/Gjmp3RGPmW5H5luOephsI8uFMMhgKiu5i3NV58ZSx29Z0aby+bfIhesZGZqJQvxeW8B0J8vlQFnEHP6xc6SAlXSdNjNpDeBaV7WSFSGKGp4Nh5QyO2ySLI=
app:
master: juice-shop
develop: juice-shop-staging
on:
repo: bkimminich/juice-shop
notifications:
webhooks:
urls:
- secure: QZ3/2h7hThg527PX1z7kTTRGL5jEbTTHRbetYHt8Gzgdhvtruq4cjxMQZdUcmxKlncAhoB976iFl/Ja9EpExgrXnt/Tj0Aft6JDc7g8y0kuD/SiQpFT7d46R7vOTJeFHyMzfQN9M/h81DXrG+VO5OPGR/QYNa39kMzkTc86tt1E=
on_success: always
on_failure: always
on_start: never
slack:
rooms:
secure: jis/Fcasy+4QCqg6SZnf1XxXTNFrQENutYCN4QuMUQbfiD6QsLxTQS5o0MZ8e9EYTdptUXmjjgkaEulxO5fIUtmDcOrKcPxToDMjyCZEglfEf9CzRVRap7LnZwoCZ5yet/0E68qt4QhfTgfwYc9QIfSZo45rdyNS6BXI2vomGqE=
on_success: change
on_failure: change
on_start: never
on_pull_requests: false