-
Notifications
You must be signed in to change notification settings - Fork 20
/
bitbucket-pipelines.yml
80 lines (77 loc) · 2.12 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
definitions:
caches:
npm: $HOME/.npm
steps:
- step: &deploy-s3
image: tshio/awscli-docker-compose-pipelines:0.0.7
script:
- npm ci
- npm run build
- aws s3 sync ./build s3://$S3_BUCKET --delete
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION --paths "/*"
pipelines:
default:
- step:
image: node:20
caches:
- node
- npm
name: Run linter and tests
script:
- cp .env.dist .env
- npm ci
- npm run lint
- npm run coverage
# START PLAYWRIGHT SPECIFIC CONFIG
pull-requests:
'**':
- step:
name: build and install
image: mcr.microsoft.com/playwright:v1.43.0-focal
caches:
- node
- npm
script:
- cp .env.dist .env
- npm ci
- npm run build:ci
- cd e2e && npm install && cd ..
artifacts:
- build/**
- e2e/node_modules/**
- parallel:
- step:
name: e2e - chrome
image: mcr.microsoft.com/playwright:v1.43.0-focal
caches:
- node
script:
- cp ./e2e/.env.dist ./e2e/.env
- cd e2e && npm run test:chrome cd ..
- step:
name: e2e - firefox
image: mcr.microsoft.com/playwright:v1.43.0-focal
caches:
- node
script:
- cp ./e2e/.env.dist ./e2e/.env
- cd e2e && npm run test:firefox cd ..
- step:
name: e2e - safari
image: mcr.microsoft.com/playwright:v1.43.0-focal
caches:
- node
script:
- cp ./e2e/.env.dist ./e2e/.env
- cd e2e && npm run test:safari cd ..
- step:
name: deploy to Staging
deployment: Staging
trigger: manual
<<: *deploy-s3
# END PLAYWRIGHT SPECIFIC CONFIG
custom:
deploy-to-Staging:
- step:
name: deploy to Staging
<<: *deploy-s3