forked from incubateur-ademe/nosgestesclimat-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
99 lines (94 loc) · 2.43 KB
/
circle.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
version: 2.1
commands:
install:
steps:
- checkout
- restore_cache:
keys:
- v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
- v1-deps-{{ .Branch }}
- v1-deps
- run: yarn install --frozen-lockfile
- save_cache:
key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/.cache
cypress:
parameters:
language:
type: enum
enum: [fr, en]
default: fr
integration_folder:
type: enum
enum: [mon-entreprise, external]
default: mon-entreprise
base_url:
type: string
default: https://mon-entreprise.fr
steps:
- run: CYPRESS_baseUrl=<< parameters.base_url >> yarn run cypress run --record --key 21660df5-36a5-4c49-b23d-801799b0c759 --env language=<< parameters.language >> --config integrationFolder=cypress/integration/<< parameters.integration_folder >>
jobs:
type-check:
docker:
- image: node
steps:
- install
- run: |
yarn run type-check
unit-test:
docker:
- image: node
steps:
- install
- run: |
git config --global core.quotepath false
yarn test
yarn test-regressions
end-to-end-test:
docker:
- image: cypress/base:8
environment:
TERM: xterm
steps:
- install
- run: yarn run compile-dev
- run:
command: yarn run serve-dev
background: true
- cypress:
base_url: http://localhost:5000
- cypress:
base_url: http://localhost:5001
language: en
production-end-to-end-test:
docker:
- image: cypress/base:8
environment:
TERM: xterm
parallelism: 3
steps:
- install
- cypress:
base_url: https://mon-entreprise.fr
- cypress:
base_url: https://mycompanyinfrance.fr
language: en
- cypress:
integration_folder: external
- run:
name: Send email if test failed
when: on_fail
command: >
curl -H 'Content-Type: application/json' --request POST -d '{"success": false}' https://hooks.zapier.com/hooks/catch/3746650/qsp818/;
workflows:
version: 2
test:
jobs:
- type-check
- unit-test
- end-to-end-test
- production-end-to-end-test:
filters:
branches:
only: master