From 2d47789f614d51ad31303b8985f6a9b5aff24625 Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Wed, 6 Jul 2022 08:12:39 +0200 Subject: [PATCH] [ci/cd] parallel tests on multiple python versions --- .gitlab-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61ff4b6..cc63a57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,13 +31,21 @@ stages: - test - build -test: - stage: test - script: +.before_script_template: &test + before_script: - apt-get update && apt-get -y install python3-venv - python3 -V # Print out python version for debugging - pip3 install pipenv - pipenv install --dev --skip-lock + +test: + image: python:${PYVERSION}-bullseye + stage: test + <<: *test + parallel: + matrix: + - PYVERSION: ["3.6", "3.7", "3.8", "3.9", "3.10"] + script: - pipenv run pytest --version - PYTHONPATH=./tests/ pipenv run pytest -v ./tests - pipenv run halfapi --version