Fakultas Ilmu Komputer UI

Commit 17a78714 authored by Izzatul Muttaqin's avatar Izzatul Muttaqin
Browse files

Buat git ci script untuk test

parent 7952a76e
Pipeline #28140 failed
stages:
- test
- deploy
# - functional_test
- functional_test
UnitTest:
image: python:3.6
......@@ -18,6 +18,24 @@ UnitTest:
- coverage run manage.py test practice
- coverage report -m
TestFunctional:
image: python:3.6
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
when: on_success
script:
- python3 manage.py makemigrations
- python3 manage.py migrate
- python3 manage.py test functional_test
Deployment:
image: ruby:2.4
stage: deploy
......@@ -33,24 +51,4 @@ Deployment:
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
- 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