-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
136 lines (130 loc) · 6.05 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
language: node_js
node_js:
- '12'
cache:
yarn: true
directories:
- "~/.cache/Cypress"
jobs:
include:
# Job de test
- stage: Tests
name: Unit tests
script: lerna run test
- name: Build
script: lerna run build
# Mise en staging des fronts
- stage: Deploy front to staging
if: branch = master
env:
- VUE_APP_CLIENT=https://mix-it-client-staging.herokuapp.com
- VUE_APP_API=https://mix-it-back.herokuapp.com
script: skip
deploy:
provider: heroku
api_key: &1
secure: bLxqUuUdrfFppdsQDNqdF2M+MNEH9F9KLWVPIX4WHNyopbwukvsMAE9tdpWqOKXa09xe23mCQRXCifPANSXjkUbwOWi8pG66PECUQqrpdwCkdNd0CR9oK2oZg1q0eKwq0wxXgJAeTbZvtPxL44c1ac376eoKmhsGnNSbfJL11FM65wbXgi1+P4whU8SVvCIvGqWEikyYc39BjcdzKVXsJcVNvGcZSEQkA3vZTEKDtlzXfUeQgIo3cEhPiqWfPnUe52Cd7FyP5yi0SCpzLZ2OE22hrDItEnjtfR5q6m2/ovQ3WW74RmLVeQp0j9WqJrpCRTtbVOvdfsBfiDSnHO1PvVZs0nmGlRmUDAI+JNC9YmqgZfPZ3SIpRvYJP6DtHcs/29+3H+GHnzKgmUq/qajA+p4CMqjPhxnaDQwUUNqvXrxqWhQlrm98T4gFk05frrKyDYOPg356lsWEpsLO6BrLKw9YYkt/Np6zhAnLMfhO+dK/lW3ZNTAgRCzDVWftP5Amg7ibiSg3BuBdOU+raBVvcrX2wgegpjNt/HFlcQQlawUTSskBIBC1mzVOf2Q2I+RXo3D0QmVKY3+W0LZBcr3qtUHZYzCUojhXLubosSfaj81grC1Lobpp4k2GpWuPtmrOq0HiNf0H/1SWXevFDHT355uSydlwp6YsHTKSuSDDzIg=
app: mix-it-front-staging
on:
repo: codenights/mix-it
branch: master
- stage: Staging client
if: branch = master
env:
- VUE_APP_API=https://mix-it-back-staging.herokuapp.com
script: skip
deploy:
provider: heroku
script: cd packages/mix-it-client
api_key: &2
secure: bLxqUuUdrfFppdsQDNqdF2M+MNEH9F9KLWVPIX4WHNyopbwukvsMAE9tdpWqOKXa09xe23mCQRXCifPANSXjkUbwOWi8pG66PECUQqrpdwCkdNd0CR9oK2oZg1q0eKwq0wxXgJAeTbZvtPxL44c1ac376eoKmhsGnNSbfJL11FM65wbXgi1+P4whU8SVvCIvGqWEikyYc39BjcdzKVXsJcVNvGcZSEQkA3vZTEKDtlzXfUeQgIo3cEhPiqWfPnUe52Cd7FyP5yi0SCpzLZ2OE22hrDItEnjtfR5q6m2/ovQ3WW74RmLVeQp0j9WqJrpCRTtbVOvdfsBfiDSnHO1PvVZs0nmGlRmUDAI+JNC9YmqgZfPZ3SIpRvYJP6DtHcs/29+3H+GHnzKgmUq/qajA+p4CMqjPhxnaDQwUUNqvXrxqWhQlrm98T4gFk05frrKyDYOPg356lsWEpsLO6BrLKw9YYkt/Np6zhAnLMfhO+dK/lW3ZNTAgRCzDVWftP5Amg7ibiSg3BuBdOU+raBVvcrX2wgegpjNt/HFlcQQlawUTSskBIBC1mzVOf2Q2I+RXo3D0QmVKY3+W0LZBcr3qtUHZYzCUojhXLubosSfaj81grC1Lobpp4k2GpWuPtmrOq0HiNf0H/1SWXevFDHT355uSydlwp6YsHTKSuSDDzIg=
app: mix-it-client-staging
on:
repo: codenights/mix-it
branch: master
# Test des déploiements en staging des fronts
- stage: Test staging
name: Test staging front
if: branch = master
env:
- CYPRESS_HOST=https://mix-it-front-staging.herokuapp.com
script:
- curl https://mix-it-front.herokuapp.com
- lerna --scope mix-it-front run test:e2e -- --headless --url https://mix-it-front-staging.herokuapp.com
- name: Test staging client
if: branch = master
env:
- CYPRESS_HOST=https://mix-it-client-staging.herokuapp.com
script:
- curl https://mix-it-client.herokuapp.com
- lerna --scope mix-it-client run test:e2e -- --headless --url https://mix-it-client-staging.herokuapp.com
# Release
- stage: Release
if: branch = master AND type = push
script: skip
deploy:
provider: script
script: yarn release
skip_cleanup: true
# Déploiement en prod
- stage: Deploy front to production
if: branch = master AND type = push
env:
- VUE_APP_CLIENT=https://mix-it-client.herokuapp.com
- VUE_APP_API=https://mix-it-back.herokuapp.com
script: skip
deploy:
provider: heroku
api_key: *1
app: mix-it-front
on:
repo: codenights/mix-it
- stage: Deploy client to production
if: branch = master AND type = push
env:
- VUE_APP_API=https://mix-it-back.herokuapp.com
script: skip
deploy:
provider: heroku
api_key: *2
app: mix-it-client
on:
repo: codenights/mix-it
# Test des déploiements en production
- stage: Test production Front
if: branch = master AND type = push
build: skip
script: curl http://mix-it-front.herokuapp.com
- name: Test production Client
if: branch = master AND type = push
build: skip
script:
- curl http://mix-it-front.herokuapp.com
- stage: Deploy API to production
if: branch = master AND type = push
name: API
script: yarn build
deploy:
provider: heroku
cleanup: false
api_key:
secure: OCVKFBTqEv4WS6g8hhJFHQbmLShjEobQOKhfG6OSGD7LbUDOXv1sbeLiyuEYC8QhHSIdTBgE7O3yknLk2BY2OTQfzsuofF8BhWF0HleWzdRdsfogYGvkMsY+B1kfGVkKzHeq9mn5m6FWbVWARI0GaKMTSwF8pEfJMybR5EEf93zXk+Telf9l38URIpXaoQZ8P9o6tfF7IHRGHE4IpA8R6z8PASDmuSn1TtkNyDGIM7HLtZPFfMfDU7myNqzV5xNb5QA0u8DpJ2kGkCJZNTfGHNmySDdSv4MUJiwGCkxY3dzmSKQdBRgypG0RDuIbZlz7vJWhseoQwGSKinnnxFtHqCtZeRq4fPNdFHFSzfIC1CbAlUFeGSq651clP5+j6Xc7oVD5oTlt4SkSvpE1NnaY8Py+8+UHz4dIeHScYGaBF9stKnCAn5bVv/gD6iR7LT7SBR0s7KfVNvLivzONV6h4I6ttF0gFupAbD7Y/qJ26+0JMjcdKzSqtQyMOxheOP3dv2H9PfY9hRyBgQKpbMsNc/DGa8qITvz/CKbub1fCrMjpfqQ3TCayaG14gNglzC+Bzg+OstglIxDWEW4fg1f/Bf8P6GxbQX2xWq+CWHDu8mf+Ww+P1B7nqEwb4CAm/KoMdOB4X6kZX5SxG5YeOxe38smHoGOAj967hYoaHYAG/c/o=
app: mix-it-back
on:
repo: codenights/mix-it
- name: API reference
if: branch = master
install: yarn global add redoc-cli
script:
- redoc-cli bundle reference/mix-it-api.v1.yaml
- mkdir public
- mv redoc-static.html public/index.html
deploy:
provider: pages
cleanup: false
token:
secure: DZi5mqQcb2aF3SyWiDWDajrWdIHr5L8+ZytU1lVaOhjR33E8Y4Aj9YLJs13c4SJiuMiw5o3IK7+UejDEvAxyd1uSLyfpgGnwZTpaDHJL/3wS72YCUElnstkj2J3X6Th9WJ2wYrZnw0cqTyPRG6DJ8z0zMduM/eXp+k4DKtghwLXxFXkxdHup7JwJxaISkddOiDh4iIEJN1DL0G4sSP7wU+7AZzrBtpBgxGGI9SQj+jrGEtLEXcmmJalOAwbG9xyaFz5ri1bU8fTLCNgt6MhVe6OCQGup062qPRKYk0fOrOikVIoZ97sZrUJ3ol5N8fQQtyiFEFbaU4WsqPEYx024AdENDJwFAMvH5FWAJzstEJ+K3BilRbH8oBjmhbKJlXnyid9eLnpN9JHusEwxyX7TrVHz5E0ikHjC5e2uRJb80IgcPvkxVggDn1NOpNsOqVvAIR7uyrMnwRnI9EyYklPfoFI5Xe4BZYq2f0d8TGVNruRx5/q1C2/3xsicer7ruWtgyP2XvD35PdqjT4hI9kdLH6J/E/q74/xyHKxMoQK8tFBB0eXKnhnABe7KNx9F7jDRitwdcGPQmw1NlXJAWYLiH+wTiORULix2vjMxvIT879inWkmq/XnMSFP2qCUneLrv/+vXjaVq8CZZxDJ5Fdx9RXJF3gXVwXXTyIepqP9JFdg=
keep_history: true
local_dir: public
on:
branch: docs-add-api-reference