.gitlab-ci.yml 643 Bytes
Newer Older
Kacprzak, Izabella's avatar
Kacprzak, Izabella committed
1
2
3
4
stages:
  - test
  - deploy-heroku

5
test-job:
Kacprzak, Izabella's avatar
Kacprzak, Izabella committed
6
  stage: test
7
  script:
8
9
10
    - apt-get update -qy
    - apt-get install -y python3 python3-pip
    - pip3 install -r requirements.txt
11
    - export ENV="dev"
12
    - python3 run_tests.py test
Kacprzak, Izabella's avatar
Kacprzak, Izabella committed
13
14

heroku-deploy:
15
  image: ruby:latest
Kacprzak, Izabella's avatar
Kacprzak, Izabella committed
16
  stage: deploy-heroku
17
  script:
18
19
20
   - apt-get update -qy
   - apt-get install -y python3 python3-pip
   - pip3 install -r requirements.txt
21
   - pip3 install python-dotenv
22
   - export ENV="prod"
23
   - cd backend
24
   - python3 -m flask db upgrade
25
   - cd ..
26
   - gem install dpl
Kacprzak, Izabella's avatar
Kacprzak, Izabella committed
27
   - dpl --provider=heroku --app=drp-inaglobe-platform --api-key=$HEROKU_API
28
29
  only:
   - master