1
0
Fork 0
forked from s3lph/matemat

GitLab CI: Run unit tests as unprivileged user.

This commit is contained in:
s3lph 2018-06-19 21:47:40 +02:00
parent 3b2d8ffa93
commit 3e3d544d90

View file

@ -8,11 +8,12 @@ stages:
test: test:
stage: test stage: test
script: script:
- useradd matemat
- apt-get update -qy - apt-get update -qy
- apt-get install -y --no-install-recommends python3-dev python3-pip python3-coverage python3-setuptools build-essential - apt-get install -y --no-install-recommends python3-dev python3-pip python3-coverage python3-setuptools build-essential
- pip3 install wheel - pip3 install wheel
- pip3 install -r requirements.txt - pip3 install -r requirements.txt
- python3-coverage run --branch -m unittest discover matemat - su - matemat 'python3-coverage run --branch -m unittest discover matemat'
- python3-coverage report -m --include 'matemat/*' --omit '*/test_*.py' - python3-coverage report -m --include 'matemat/*' --omit '*/test_*.py'
codestyle: codestyle: