matemat/.gitlab-ci.yml

42 lines
1.1 KiB
YAML
Raw Normal View History

2018-05-29 21:49:40 +02:00
---
image: s3lph/matemat-ci:20180711-02
2018-05-29 21:49:40 +02:00
stages:
- test
2018-07-11 17:17:00 +02:00
- build
- staging
2018-05-29 21:49:40 +02:00
test:
stage: test
2018-05-29 21:49:40 +02:00
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:
2018-07-11 17:17:00 +02:00
stage: test
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-11 17:17:00 +02:00
build:
stage: build
script:
2018-07-10 22:33:44 +02:00
- 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
2018-07-10 22:33:44 +02:00
- docker push "registry.gitlab.com/s3lph/matemat:$(git rev-parse HEAD)"
2018-07-11 17:17:00 +02:00
staging:
stage: staging
script:
- eval $(ssh-agent -s)
- ssh-add - <<<"$STAGING_SSH_PRIVATE_KEY"
- echo "$(git rev-parse HEAD)" | ssh -p 20022 -oStrictHostKeyChecking=no matemat@kernelpanic.lol
2018-07-11 17:17:00 +02:00
environment:
name: staging
url: https://matemat.kernelpanic.lol/
only:
- staging-unstable
- alpine-image