Fakultas Ilmu Komputer UI

Commit 5643f20d authored by Muhammad Ilham Peruzzi's avatar Muhammad Ilham Peruzzi
Browse files

add gitlab ci

parent 40fed710
Pipeline #20453 failed with stages
in 47 seconds
stages:
- test
- deploy
- test_functional
Test:
image: python:3.7
stage: test
before_script:
- pip3 install --upgrade pip
- pip3 install -r requirements.txt
script:
- python3 manage.py makemigrations
- python3 manage.py migrate
- python3 manage.py test
tags:
- test
Deployment:
image: ruby:2.4
stage: deploy
before_script:
- gem install dpl
- wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
script:
- export HEROKU_API_KEY=$HEROKU_APIKEY
- dpl --provider=heroku --app=$HEROKU_APPNAME --api-key=$HEROKU_APIKEY
- heroku ps:scale web=1 migrate=1 --app $HEROKU_APPNAME
- heroku ps:restart --app=$HEROKU_APPNAME
environment:
name: production
url: $HEROKU_APP_HOST
TestFunctional:
image: python:3.7
stage: test_functional
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
- 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_chrome.py
\ 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