-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
59 lines (56 loc) · 1.26 KB
/
.gitlab-ci.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
stages:
- test
- dev
- production
coverage:
image: python:3.6
stage: test
before_script:
- pip install -r requirements.txt
when: on_success
script:
- coverage run --source='courses' manage.py test
- coverage report -m
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
dev:
image: ruby:2.6
stage: dev
environment:
name: dev
url: $DEV_URL
script:
- apt-get update
- apt-get install -y curl
- curl -sL https://deb.nodesource.com/setup_6.x | bash -
- apt-get install -y nodejs
- apt-get install -y npm
- npm install
- npm run build
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_APP_NAME_DEV --api-key=$HEROKU_API_KEY --skip_cleanup
artifacts:
paths:
- static/dist/
only:
- dev
production:
image: ruby:2.6
stage: production
environment:
name: production
url: $PRODUCTION_URL
script:
- apt-get update
- apt-get install -y curl
- curl -sL https://deb.nodesource.com/setup_6.x | bash -
- apt-get install -y nodejs
- apt-get install -y npm
- npm install
- npm run build
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_APP_NAME_PRODUCTION --api-key=$HEROKU_API_KEY --skip_cleanup
artifacts:
paths:
- static/dist/
only:
- master