1
0
Fork 0
forked from s3lph/matemat

Made unit tests unprivileged again (using sudo)

This commit is contained in:
s3lph 2018-07-10 22:08:35 +02:00
parent 4292cf8696
commit bc19893d90
2 changed files with 9 additions and 6 deletions

View file

@ -1,5 +1,5 @@
---
image: s3lph/matemat-ci:20180710-02
image: s3lph/matemat-ci:20180710-03
stages:
- test
@ -10,15 +10,15 @@ test:
stage: test
script:
- pip3 install -r requirements.txt
- python3-coverage run --branch -m unittest discover matemat
- python3-coverage report -m --include 'matemat/*' --omit '*/test_*.py'
- 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
- pycodestyle matemat
# - mypy --ignore-missing-imports --strict -p matemat
- sudp -u matemat pycodestyle matemat
# - sudp -u matemat mypy --ignore-missing-imports --strict -p matemat
docker_build_push:
stage: deploy

View file

@ -1,6 +1,9 @@
FROM debian:buster
RUN useradd -d /home/matemat -m matemat
RUN apt-get update -qy
RUN apt-get install -y --no-install-recommends git docker.io python3-dev python3-pip python3-coverage python3-setuptools build-essential
RUN apt-get install -y --no-install-recommends sudo git docker.io python3-dev python3-pip python3-coverage python3-setuptools build-essential
RUN pip3 install wheel pycodestyle mypy
WORKDIR /home/matemat