Skip to content
Snippets Groups Projects
Commit 25bdba92 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Update CI to explicitly test doc building

Improve setup script (add prod and CI parameters)
Improve calling of setup script in CI configuration
Add doc generation action to CI configuration
parent 94bde9bf
No related branches found
No related tags found
No related merge requests found
......@@ -18,8 +18,7 @@ before_script:
- python -V # Print out python version for debugging
- apt-get -qq update
- apt-get -qq install -y python3-virtualenv python3 python3-dev python3-pip gettext default-mysql-client default-libmysqlclient-dev
- export DJANGO_SETTINGS_MODULE=AKPlanning.settings_ci
- ./Utils/setup.sh --prod
- ./Utils/setup.sh --ci
- mkdir -p public/badges public/lint
- echo undefined > public/badges/$CI_JOB_NAME.score
- source venv/bin/activate
......@@ -70,6 +69,16 @@ lint:
codequality: codeclimate.json
when: always
doc:
stage: test
script:
- cd docs
- make html
- cd ..
artifacts:
paths:
- docs/_build/html
pages:
stage: deploy
image: alpine:latest
......
......@@ -15,6 +15,14 @@ source venv/bin/activate
pip install --upgrade setuptools pip wheel
pip install -r requirements.txt
# set environment variable when we want to update in production
if [ "$1" = "--prod" ]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
fi
if [ "$1" = "--ci" ]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_ci
fi
# Setup database
python manage.py migrate
......@@ -26,9 +34,12 @@ python manage.py compilemessages -l de_DE
# Credentials are entered interactively on CLI
python manage.py createsuperuser
# Generate documentation
cd docs
make html
cd ..
# Generate documentation (but not for CI use)
if [ -n "$1" = "--ci" ]; then
cd docs
make html
cd ..
fi
deactivate
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment