This repository has been archived by the owner on May 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
64 lines (59 loc) · 1.59 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
60
61
62
63
64
before_script:
- ruby -v
- echo "deb http://toolbelt.heroku.com/ubuntu ./" > /etc/apt/sources.list.d/heroku.list
- wget -O- https://toolbelt.heroku.com/apt/release.key | apt-key add -
- apt-get update -qy
- apt-get install -y libssl-dev build-essential wget ruby-dev heroku-toolbelt
- wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- source /root/.bashrc
- nvm install --lts
- nvm use node
- node -v
- npm -v
- gem install dpl
- npm install
services:
- name: mdillon/postgis
alias: postgis
variables:
POSTGRES_DB: bike_parking_toronto
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "postgres"
test:
script:
- apt-get update -qy
- apt-get install -y python3-dev python3-pip
- pip3 install -r requirements.txt
- source test/useci
- coverage run --source='bicycleparking/' manage.py test --no-input
- coverage html
- coverage report -m
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
artifacts:
paths:
- htmlcov/
pages:
stage: deploy
dependencies:
- test
script:
- mkdir -p public/
- mv htmlcov/ public/
artifacts:
paths:
- public
expire_in: 30 days
only:
- master
staging:
type: deploy
script:
- dpl --provider=heroku --app=torontobikeparking-staging --api-key=$HEROKU_STAGING_API_KEY
only:
- master
production:
type: deploy
script:
- dpl --provider=elasticbeanstalk --access-key-id=$AWS_ACCESS_KEY_ID --secret-access-key="$AWS_SECRET_ACCESS_KEY" --app="bikespace" --env="bikespace-env" --region="us-east-1" --bucket_name=$ELB_BUCKET_NAME
only:
- tags