matemat/.gitlab-ci.yml
2018-07-10 22:33:44 +02:00

28 lines
783 B
YAML

---
image: s3lph/matemat-ci:20180710-03
stages:
- test
- codestyle
- deploy
test:
stage: test
script:
- pip3 install -r requirements.txt
- sudo -u matemat python3-coverage run --branch -m unittest discover matemat
- sudo -u matemat python3-coverage report -m --include 'matemat/*' --omit '*/test_*.py'
codestyle:
stage: codestyle
script:
- pip3 install -r requirements.txt
- sudo -u matemat pycodestyle matemat
# - sudo -u matemat mypy --ignore-missing-imports --strict -p matemat
docker_build_push:
stage: deploy
script:
- docker build -t "registry.gitlab.com/s3lph/matemat:$(git rev-parse HEAD)" .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_TOKEN registry.gitlab.com
- docker push "registry.gitlab.com/s3lph/matemat:$(git rev-parse HEAD)"