2018-10-04 19:16:02 +00:00
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
|
2018-10-04 19:35:39 +00:00
|
|
|
test:
|
|
|
|
stage: test
|
2016-04-18 02:58:15 +00:00
|
|
|
script:
|
2021-09-30 08:48:08 +00:00
|
|
|
- env
|
2016-11-08 18:17:42 +00:00
|
|
|
- apt-get update
|
2019-07-15 12:29:47 +00:00
|
|
|
- apt-get install -y gettext python3-xapian libgraphviz-dev
|
2018-11-26 18:54:51 +00:00
|
|
|
- pushd /usr/lib/python3/dist-packages/xapian && ln -s _xapian* _xapian.so && popd
|
|
|
|
- export PYTHONPATH="/usr/lib/python3/dist-packages:$PYTHONPATH"
|
|
|
|
- python -c 'import xapian' # Fail immediately if there is a problem with xapian
|
2021-09-30 09:07:00 +00:00
|
|
|
- pip install -U -r requirements.txt
|
|
|
|
- pip install -U coverage
|
2021-09-30 08:48:08 +00:00
|
|
|
- mkdir -p /dev/shm/search_indexes
|
|
|
|
- ln -s /dev/shm/search_indexes sith/search_indexes
|
2017-08-29 13:13:09 +00:00
|
|
|
- ./manage.py compilemessages
|
|
|
|
- coverage run ./manage.py test
|
|
|
|
- coverage html
|
|
|
|
- coverage report
|
2019-08-14 16:56:53 +00:00
|
|
|
- cd doc
|
|
|
|
- make html # Make documentation
|
2021-09-30 09:07:00 +00:00
|
|
|
variables:
|
|
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip_tests"
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- .cache/pip_tests
|
2017-08-29 13:13:09 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- coverage_report/
|
2018-10-04 19:16:02 +00:00
|
|
|
|
|
|
|
black:
|
|
|
|
stage: test
|
|
|
|
script:
|
2021-09-30 09:07:00 +00:00
|
|
|
- pip install -U black
|
2018-10-04 19:16:02 +00:00
|
|
|
- black --check .
|
2021-09-30 09:07:00 +00:00
|
|
|
variables:
|
|
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip_black"
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- .cache/pip_black
|