2019-02-22 15:10:56 +01:00
|
|
|
variables:
|
|
|
|
CONTAINER_REGISTRY: $CI_REGISTRY/georg/mat2-ci-images
|
2023-03-20 15:53:56 +01:00
|
|
|
GIT_DEPTH: "5"
|
2023-03-20 15:50:48 +01:00
|
|
|
GIT_STRATEGY: clone
|
2018-03-27 20:58:21 +02:00
|
|
|
|
2018-05-01 00:01:18 +02:00
|
|
|
stages:
|
|
|
|
- linting
|
|
|
|
- test
|
|
|
|
|
2019-07-22 22:39:06 +02:00
|
|
|
.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 .
|
2019-07-22 22:31:40 +02:00
|
|
|
|
2023-02-20 20:00:14 +01:00
|
|
|
linting:ruff:
|
2023-03-07 12:25:17 +01:00
|
|
|
image: $CONTAINER_REGISTRY:linting
|
2018-07-09 01:12:59 +02:00
|
|
|
stage: linting
|
|
|
|
script:
|
2023-02-20 20:00:14 +01:00
|
|
|
- apt update
|
|
|
|
- apt install -qqy --no-install-recommends python3-venv
|
|
|
|
- python3 -m venv venv
|
|
|
|
- source venv/bin/activate
|
|
|
|
- pip3 install ruff
|
|
|
|
- ruff check .
|
2018-07-09 01:12:59 +02:00
|
|
|
|
2019-03-09 13:15:10 +01:00
|
|
|
linting:mypy:
|
2019-02-22 15:10:56 +01:00
|
|
|
image: $CONTAINER_REGISTRY:linting
|
2018-06-04 22:54:01 +02:00
|
|
|
stage: linting
|
|
|
|
script:
|
2022-12-05 20:31:12 +01:00
|
|
|
- mypy --ignore-missing-imports mat2 libmat2/*.py
|
2018-06-04 22:54:01 +02:00
|
|
|
|
2019-03-09 13:15:10 +01:00
|
|
|
tests:archlinux:
|
|
|
|
image: $CONTAINER_REGISTRY:archlinux
|
|
|
|
stage: test
|
|
|
|
script:
|
2019-12-01 16:58:25 +01:00
|
|
|
- python3 -m unittest discover -v
|
2019-03-09 13:15:10 +01:00
|
|
|
|
2018-06-12 22:40:57 +02:00
|
|
|
tests:debian:
|
2019-02-22 15:10:56 +01:00
|
|
|
image: $CONTAINER_REGISTRY:debian
|
2018-05-01 00:01:18 +02:00
|
|
|
stage: test
|
2021-10-03 19:52:45 +02:00
|
|
|
<<: *prepare_env
|
2018-03-25 17:42:29 +02:00
|
|
|
script:
|
2019-03-09 13:15:10 +01:00
|
|
|
- apt-get -qqy purge bubblewrap
|
2021-10-03 19:52:45 +02:00
|
|
|
- su - mat2 -c "python3-coverage run --branch -m unittest discover -s tests/"
|
|
|
|
- su - mat2 -c "python3-coverage report --fail-under=95 -m --include 'libmat2/*'"
|
2019-02-03 10:43:27 +01:00
|
|
|
|
|
|
|
tests:debian_with_bubblewrap:
|
2019-02-22 15:10:56 +01:00
|
|
|
image: $CONTAINER_REGISTRY:debian
|
2019-02-03 10:43:27 +01:00
|
|
|
stage: test
|
2021-05-05 21:04:29 +02:00
|
|
|
allow_failure: true
|
2019-07-22 22:39:06 +02:00
|
|
|
<<: *prepare_env
|
2019-02-03 10:43:27 +01:00
|
|
|
script:
|
2021-10-03 19:52:45 +02:00
|
|
|
- apt-get -qqy install bubblewrap
|
|
|
|
- python3 -m unittest discover -v
|
2018-06-12 22:40:57 +02:00
|
|
|
|
|
|
|
tests:fedora:
|
2019-02-22 15:10:56 +01:00
|
|
|
image: $CONTAINER_REGISTRY:fedora
|
2018-06-12 22:40:57 +02:00
|
|
|
stage: test
|
|
|
|
script:
|
2019-12-01 16:58:25 +01:00
|
|
|
- python3 -m unittest discover -v
|
2018-09-01 15:07:01 +02:00
|
|
|
|
2019-03-09 13:15:10 +01:00
|
|
|
tests:gentoo:
|
|
|
|
image: $CONTAINER_REGISTRY:gentoo
|
2018-09-01 15:07:01 +02:00
|
|
|
stage: test
|
2019-07-22 22:39:06 +02:00
|
|
|
<<: *prepare_env
|
2018-09-01 15:07:01 +02:00
|
|
|
script:
|
2019-07-22 22:39:06 +02:00
|
|
|
- su - mat2 -c "python3 -m unittest discover -v"
|
2023-03-09 20:54:58 +01:00
|
|
|
|
|
|
|
tests:python3.7:
|
|
|
|
image: $CONTAINER_REGISTRY:python3.7
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- python3 -m unittest discover -v
|
|
|
|
|
|
|
|
tests:python3.8:
|
|
|
|
image: $CONTAINER_REGISTRY:python3.8
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- python3 -m unittest discover -v
|
|
|
|
|
|
|
|
tests:python3.9:
|
|
|
|
image: $CONTAINER_REGISTRY:python3.9
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- python3 -m unittest discover -v
|
|
|
|
|
|
|
|
tests:python3.10:
|
|
|
|
image: $CONTAINER_REGISTRY:python3.10
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- python3 -m unittest discover -v
|
|
|
|
|
|
|
|
tests:python3.11:
|
|
|
|
image: $CONTAINER_REGISTRY:python3.11
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- python3 -m unittest discover -v
|