forked from cypress-io/cypress-realworld-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
52 lines (50 loc) · 1.59 KB
/
buildspec.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
version: 0.2
batch:
fast-fail: false
build-matrix:
static:
ignore-failure: false
env:
type: LINUX_CONTAINER
privileged-mode: true
compute-type: BUILD_GENERAL1_MEDIUM
dynamic:
env:
compute-type:
- BUILD_GENERAL1_MEDIUM
image:
- public.ecr.aws/s9l6w2o6/cypress-browsers-node14.15.0-chrome86-ff82
variables:
CY_GROUP_SPEC:
- "UI - Chrome|chrome|cypress/tests/ui/*"
- "UI - Chrome - Mobile|chrome|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667"
- "API|chrome|cypress/tests/api/*"
- "UI - Firefox|firefox|cypress/tests/ui/*"
- "UI - Firefox - Mobile|firefox|cypress/tests/ui/*|viewportWidth=375,viewportHeight=667"
WORKERS:
- 1
- 2
- 3
- 4
- 5
phases:
install:
commands:
- echo $CODEBUILD_INITIATOR
- echo $CY_GROUP_SPEC
- CY_GROUP=$(echo $CY_GROUP_SPEC | cut -d'|' -f1)
- CY_BROWSER=$(echo $CY_GROUP_SPEC | cut -d'|' -f2)
- CY_SPEC=$(echo $CY_GROUP_SPEC | cut -d'|' -f3)
- CY_CONFIG=$(echo $CY_GROUP_SPEC | cut -d'|' -f4)
- echo $CY_GROUP
- echo $CY_BROWSER
- echo $CY_SPEC
- echo $CY_CONFIG
- yarn install --frozen-lockfile
pre_build:
commands:
- yarn run build
build:
commands:
- yarn start:ci & npx wait-on http://localhost:3000
- npx cypress run --record --parallel --browser $CY_BROWSER --ci-build-id $CODEBUILD_INITIATOR --group "$CY_GROUP" --spec "$CY_SPEC" --config "$CY_CONFIG"