Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Commit a81ea65d authored by georg's avatar georg Committed by jvoisin
Browse files

CI: Run bubblewrap tests as different user than 'root' to fix errors

It seems, there is a bug somewhere if the test suite is invoked as
'root', and bubblewrap is available.
parent 8bb2826f
Pipeline #26011 passed with stages
in 2 minutes and 16 seconds
......@@ -5,6 +5,11 @@ stages:
- linting
- test
.prepare_env: &prepare_env
before_script: # This is needed to not run the testsuite as root
- useradd --home-dir ${CI_PROJECT_DIR} mat2
- chown -R mat2 .
image: $CONTAINER_REGISTRY:linting
stage: linting
......@@ -60,9 +65,10 @@ tests:debian_with_bubblewrap:
stage: test
allow_failure: true
<<: *prepare_env
- python3-coverage run --branch -m unittest discover -s tests/
- python3-coverage report --fail-under=100 -m --include 'libmat2/*'
- su - mat2 -c "python3-coverage run --branch -m unittest discover -s tests/"
- su - mat2 -c "python3-coverage report --fail-under=100 -m --include 'libmat2/*'"
......@@ -74,5 +80,6 @@ tests:gentoo:
stage: test
allow_failure: true
<<: *prepare_env
- python3 -m unittest discover -v
- su - mat2 -c "python3 -m unittest discover -v"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment