refactored test pipeline to test different python versions

This commit is contained in:
Oscar Krause 2025-04-16 12:12:23 +02:00
parent a8c1cdf095
commit 477e5abbca

View File

@ -126,8 +126,8 @@ build:pacman:
paths: paths:
- "*.pkg.tar.zst" - "*.pkg.tar.zst"
test: test:python:
image: python:3.12-slim-bookworm image: $IMAGE
stage: test stage: test
interruptible: true interruptible: true
rules: rules:
@ -142,17 +142,19 @@ test:
DATABASE: sqlite:///../app/db.sqlite DATABASE: sqlite:///../app/db.sqlite
parallel: parallel:
matrix: matrix:
- REQUIREMENTS: - IMAGE:
- 'requirements.txt' # - python:3.14-alpine
# - '.DEBIAN/requirements-bookworm-12.txt' # - python:3.13-alpine
# - '.DEBIAN/requirements-ubuntu-24.04.txt' - python:3.12-alpine
# - '.DEBIAN/requirements-ubuntu-24.10.txt' # - python:3.11-alpine
# - python:3.10-alpine
# - python:3.9-alpine
before_script: before_script:
- apt-get update && apt-get install -y python3-dev python3-pip python3-venv gcc - apt-get update && apt-get install -y python3-dev python3-pip python3-venv gcc
- python3 -m venv venv - python3 -m venv venv
- source venv/bin/activate - source venv/bin/activate
- pip install --upgrade pip - pip install --upgrade pip
- pip install -r $REQUIREMENTS - pip install -r requirements.txt
- pip install pytest pytest-cov pytest-custom_exit_code httpx - pip install pytest pytest-cov pytest-custom_exit_code httpx
- mkdir -p app/cert - mkdir -p app/cert
- openssl genrsa -out app/cert/instance.private.pem 2048 - openssl genrsa -out app/cert/instance.private.pem 2048