Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1606837915-practice
Commits
f0335d14
Commit
f0335d14
authored
Sep 25, 2019
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
f0335d14
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 &
-
pip
3
install -r requirements.txt
-
pip
3
install requests
-
pip
3
install django-environ
-
python
3
manage.py makemigrations
-
python
3
manage.py migrate
-
python
3
manage.py collectstatic --no-input
-
python
3
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment