Fakultas Ilmu Komputer UI

Commit f0335d14 authored by Izzatul Muttaqin's avatar Izzatul Muttaqin
Browse files

Merge branch 'tutorial-2' into 'master'

Tutorial 2

See merge request !3
parents dffb1fca e05b4ead
Pipeline #20646 failed with stages
in 6 minutes and 34 seconds
stages:
- test
- deploy
- functional_test
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
......@@ -27,9 +28,30 @@ 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
only:
- master
FunctionalTest:
image: python:3.6
stage: functional_test
before_script:
- 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
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