From 3e3d544d902671a1be178a2e658e73369a2816f6 Mon Sep 17 00:00:00 2001 From: s3lph Date: Tue, 19 Jun 2018 21:47:40 +0200 Subject: [PATCH] GitLab CI: Run unit tests as unprivileged user. --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d351014..b46ce36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,11 +8,12 @@ stages: test: stage: test script: + - useradd matemat - apt-get update -qy - apt-get install -y --no-install-recommends python3-dev python3-pip python3-coverage python3-setuptools build-essential - pip3 install wheel - 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' codestyle: