-
Notifications
You must be signed in to change notification settings - Fork 1
/
bitbucket-pipelines.yml
60 lines (59 loc) · 1.95 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
image: node:14.16.0
pipelines:
default:
- step:
name: Build and Install
caches:
- node
script:
- npm install
- step:
name: Configure application environment variables
script:
- echo "Setting up environment variables"
- touch .env
- echo PORT=$PORT >> .env
- echo BASE_URL=$BASE_URL >> .env
- echo NODE_ENV=testing >> .env
- step:
name: Run Unit Tests
script:
- npm test
caches:
- node
# - parallel:
# - step:
# name: Install cypress dependencies
# caches:
# - node
# script:
# - npm install
# - npm start
# - step:
# name: Run E2E Tests
# script:
# - npm run e2e
# - step:
# name: Run Integration Tests
# script:
# - npm install
# - npm start
# - npm run e2e
- step:
name: Create application artifacts
script:
- git archive --format=tar.gz main -o application.tar.gz
artifacts:
- application.tar.gz
- step:
name: Deploy to Heroku dyno
deployment: test
caches:
- node
script:
- pipe: atlassian/heroku-deploy:1.2.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE: 'application.tar.gz'
WAIT: 'true' # Wait for the deployment to finish