forked from cypress-io/cypress-realworld-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
110 lines (104 loc) · 3.25 KB
/
bitbucket-pipelines.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
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge
api-tests: &api-tests
name: "API Tests"
caches:
- cypress
- node
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser chrome --group "API" --spec "cypress/tests/api/*" --ci-build-id $BITBUCKET_BUILD_NUMBER
ui-chrome-tests: &ui-chrome-tests
name: "UI Tests - Chrome"
caches:
- cypress
- node
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser chrome --group "UI - Chrome" --spec "cypress/tests/ui/*" --ci-build-id $BITBUCKET_BUILD_NUMBER
ui-chrome-tests-mobile: &ui-chrome-tests-mobile
name: "UI Tests - Chrome - Mobile"
caches:
- cypress
- node
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser chrome --group "UI - Chrome - Mobile" --spec "cypress/tests/ui/*" --ci-build-id $BITBUCKET_BUILD_NUMBER --config "viewportWidth=375,viewportHeight=667"
ui-firefox-tests: &ui-firefox-tests
name: "UI Tests - Firefox"
caches:
- cypress
- node
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser firefox --group "UI - Firefox" --spec "cypress/tests/ui/*" --ci-build-id $BITBUCKET_BUILD_NUMBER
ui-firefox-tests-mobile: &ui-firefox-tests-mobile
name: "UI Tests - Firefox - Mobile"
caches:
- cypress
- node
script:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser firefox --group "UI - Firefox - Mobile" --spec "cypress/tests/ui/*" --ci-build-id $BITBUCKET_BUILD_NUMBER --config "viewportWidth=375,viewportHeight=667"
pipelines:
default:
- step:
name: Install dependencies and build frontend application
caches:
- yarn
- cypress
- node
script:
- yarn install --frozen-lockfile
- yarn types
- yarn lint
- yarn test:unit:ci
- yarn build:ci
artifacts:
- build/**
- parallel:
- step:
<<: *api-tests
- step:
<<: *ui-chrome-tests
- step:
<<: *ui-chrome-tests
- step:
<<: *ui-chrome-tests
- step:
<<: *ui-chrome-tests
- step:
<<: *ui-chrome-tests
- step:
<<: *ui-chrome-tests-mobile
- step:
<<: *ui-chrome-tests-mobile
- step:
<<: *ui-chrome-tests-mobile
- step:
<<: *ui-chrome-tests-mobile
- step:
<<: *ui-chrome-tests-mobile
- step:
<<: *ui-firefox-tests
- step:
<<: *ui-firefox-tests
- step:
<<: *ui-firefox-tests
- step:
<<: *ui-firefox-tests
- step:
<<: *ui-firefox-tests
- step:
<<: *ui-firefox-tests-mobile
- step:
<<: *ui-firefox-tests-mobile
- step:
<<: *ui-firefox-tests-mobile
- step:
<<: *ui-firefox-tests-mobile
- step:
<<: *ui-firefox-tests-mobile
definitions:
caches:
yarn: $HOME/.cache
cypress: $HOME/.cache/Cypress