Skip to content
Snippets Groups Projects
Verified Commit a3e41ed9 authored by Lars Bilke's avatar Lars Bilke
Browse files

[ci] Test multiple python versions.

parent 61d99446
No related branches found
No related tags found
1 merge request!2CI with Python template
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# we test all released and supported versions
# https://devguide.python.org/versions/#supported-versions
.python-versions:
versions:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
.python-default:
image: python:3.8
image: python:$PYTHON_VERSIONS
cache:
paths:
- .cache/pip
......@@ -15,3 +24,6 @@ variables:
when: on_failure
paths:
- "*.log"
parallel:
matrix:
- PYTHON_VERSIONS: !reference [.python-versions, versions]
......@@ -7,6 +7,7 @@ py_build:
matrix:
- PROJECT_ROOT: "test/python-template"
EXIT_CODE: 0
PYTHON_VERSIONS: !reference [.python-versions, versions]
py_tests:
before_script:
......@@ -20,9 +21,8 @@ py_tests:
parallel:
matrix:
- PROJECT_ROOT: "test/python-template"
EXIT_CODE: 0
- PROJECT_ROOT: "test/python-template"
EXIT_CODE: 1
EXIT_CODE: [0, 1]
PYTHON_VERSIONS: !reference [.python-versions, versions]
allow_failure:
exit_codes: 1
......@@ -35,3 +35,4 @@ py_lint:
matrix:
- PROJECT_ROOT: "test/python-template"
EXIT_CODE: 0
PYTHON_VERSIONS: !reference [.python-versions, versions]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment