2018-05-29 21:49:40 +02:00
|
|
|
---
|
2018-07-10 22:08:35 +02:00
|
|
|
image: s3lph/matemat-ci:20180710-03
|
2018-05-29 21:49:40 +02:00
|
|
|
|
2018-06-05 22:38:42 +02:00
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- codestyle
|
2018-07-10 20:25:34 +02:00
|
|
|
- deploy
|
2018-06-05 22:38:42 +02:00
|
|
|
|
2018-05-29 21:49:40 +02:00
|
|
|
test:
|
2018-06-05 22:38:42 +02:00
|
|
|
stage: test
|
2018-05-29 21:49:40 +02:00
|
|
|
script:
|
|
|
|
- pip3 install -r requirements.txt
|
2018-07-10 22:08:35 +02:00
|
|
|
- sudo -u matemat python3-coverage run --branch -m unittest discover matemat
|
|
|
|
- sudo -u matemat python3-coverage report -m --include 'matemat/*' --omit '*/test_*.py'
|
2018-06-05 22:32:09 +02:00
|
|
|
|
|
|
|
codestyle:
|
2018-06-05 22:38:42 +02:00
|
|
|
stage: codestyle
|
2018-06-05 22:32:09 +02:00
|
|
|
script:
|
|
|
|
- pip3 install -r requirements.txt
|
2018-07-10 22:18:57 +02:00
|
|
|
- sudo -u matemat pycodestyle matemat
|
|
|
|
# - sudo -u matemat mypy --ignore-missing-imports --strict -p matemat
|
2018-07-10 20:25:34 +02:00
|
|
|
|
|
|
|
docker_build_push:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
|
|
|
- docker build -t "s3lph/matemat:$(git rev-parse HEAD)" .
|
|
|
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_TOKEN registry.gitlab.com
|
2018-07-10 22:25:56 +02:00
|
|
|
- docker push "s3lph/matemat:$(git rev-parse HEAD)"
|