Fakultas Ilmu Komputer UI

Commit 74e9b480 authored by Izzatul Muttaqin's avatar Izzatul Muttaqin
Browse files

Change deploy ci

parent 3d91dbea
Pipeline #20639 failed
......@@ -7,13 +7,13 @@ UnitTest:
image: python:3.6
stage: test
before_script:
- pip install -r requirements.txt
- pip install requests
- pip install django-environ
- python manage.py makemigrations
- python manage.py migrate
- python manage.py collectstatic --no-input
- python manage.py runserver 8000 &
- pip3 install -r requirements.txt
- pip3 install requests
- pip3 install django-environ
- python3 manage.py makemigrations
- python3 manage.py migrate
- python3 manage.py collectstatic --no-input
- python3 manage.py runserver 8000 &
when: on_success
script:
- coverage run --include='personal_*' manage.py test
......@@ -28,7 +28,8 @@ Deployment:
script:
- dpl --provider=heroku --app=$HEROKU_APPNAME --api-key=$HEROKU_APIKEY
- export HEROKU_API_KEY=$HEROKU_APIKEY
- heroku run --app $HEROKU_APPNAME migrate
- heroku ps:scale web=1 migrate=1 --app $HEROKU_APPNAME
- heroku ps:restart --app=$HEROKU_APPNAME
environment:
name: production
url: $HEROKU_APP_HOST
......@@ -42,12 +43,15 @@ TestFunctional:
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
- pip3 install -r requirements.txt
- pip3 install requests
- pip3 install django-environ
- apt-get update -qq && apt-get install -y -qq unzip
- apt-get install -y google-chrome-stable
- apt-get install -y xvfb
- wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- python manage.py runserver 8000 &
when: on_success
script:
- python3 functional_tests.py
only:
- master
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment