Made unit tests unprivileged again (using sudo)
This commit is contained in:
parent
4292cf8696
commit
bc19893d90
2 changed files with 9 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
image: s3lph/matemat-ci:20180710-02
|
image: s3lph/matemat-ci:20180710-03
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
@ -10,15 +10,15 @@ test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip3 install -r requirements.txt
|
- pip3 install -r requirements.txt
|
||||||
- python3-coverage run --branch -m unittest discover matemat
|
- sudo -u matemat python3-coverage run --branch -m unittest discover matemat
|
||||||
- python3-coverage report -m --include 'matemat/*' --omit '*/test_*.py'
|
- sudo -u matemat python3-coverage report -m --include 'matemat/*' --omit '*/test_*.py'
|
||||||
|
|
||||||
codestyle:
|
codestyle:
|
||||||
stage: codestyle
|
stage: codestyle
|
||||||
script:
|
script:
|
||||||
- pip3 install -r requirements.txt
|
- pip3 install -r requirements.txt
|
||||||
- pycodestyle matemat
|
- sudp -u matemat pycodestyle matemat
|
||||||
# - mypy --ignore-missing-imports --strict -p matemat
|
# - sudp -u matemat mypy --ignore-missing-imports --strict -p matemat
|
||||||
|
|
||||||
docker_build_push:
|
docker_build_push:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
|
|
||||||
FROM debian:buster
|
FROM debian:buster
|
||||||
|
|
||||||
|
RUN useradd -d /home/matemat -m matemat
|
||||||
RUN apt-get update -qy
|
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
|
RUN pip3 install wheel pycodestyle mypy
|
||||||
|
|
||||||
|
WORKDIR /home/matemat
|
||||||
|
|
Loading…
Reference in a new issue