mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2026-04-08 10:35:47 +03:00
Compare commits
7 Commits
a8c1cdf095
...
3fe3429986
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fe3429986 | ||
|
|
a996504c50 | ||
|
|
5d2bff88d8 | ||
|
|
67f2d18a95 | ||
|
|
52cd34cb5c | ||
|
|
6fb03309a5 | ||
|
|
477e5abbca |
@@ -126,13 +126,12 @@ build:pacman:
|
||||
paths:
|
||||
- "*.pkg.tar.zst"
|
||||
|
||||
test:
|
||||
image: python:3.12-slim-bookworm
|
||||
test:python:
|
||||
image: $IMAGE
|
||||
stage: test
|
||||
interruptible: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_COMMIT_TAG
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
|
||||
changes:
|
||||
@@ -142,17 +141,20 @@ test:
|
||||
DATABASE: sqlite:///../app/db.sqlite
|
||||
parallel:
|
||||
matrix:
|
||||
- REQUIREMENTS:
|
||||
- 'requirements.txt'
|
||||
# - '.DEBIAN/requirements-bookworm-12.txt'
|
||||
# - '.DEBIAN/requirements-ubuntu-24.04.txt'
|
||||
# - '.DEBIAN/requirements-ubuntu-24.10.txt'
|
||||
- IMAGE:
|
||||
# https://devguide.python.org/versions/#supported-versions
|
||||
- python:3.14-alpine # EOL 2030-10
|
||||
- python:3.13-alpine # EOL 2029-10
|
||||
- python:3.12-alpine # EOL 2028-10
|
||||
- python:3.11-alpine # EOL 2027-10
|
||||
- python:3.10-alpine # EOL 2026-10
|
||||
- python:3.9-alpine # EOL 2025-10
|
||||
before_script:
|
||||
- apt-get update && apt-get install -y python3-dev python3-pip python3-venv gcc
|
||||
- apk --no-cache add openssl
|
||||
- python3 -m venv venv
|
||||
- source venv/bin/activate
|
||||
- pip install --upgrade pip
|
||||
- pip install -r $REQUIREMENTS
|
||||
- pip install -r requirements.txt
|
||||
- pip install pytest pytest-cov pytest-custom_exit_code httpx
|
||||
- mkdir -p app/cert
|
||||
- openssl genrsa -out app/cert/instance.private.pem 2048
|
||||
@@ -162,10 +164,10 @@ test:
|
||||
- python -m pytest main.py --junitxml=report.xml
|
||||
artifacts:
|
||||
reports:
|
||||
dotenv: version.env
|
||||
junit: ['**/report.xml']
|
||||
|
||||
.test:apt:
|
||||
test:apt:
|
||||
image: $IMAGE
|
||||
stage: test
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
|
||||
@@ -173,6 +175,14 @@ test:
|
||||
- app/**/*
|
||||
- .DEBIAN/**/*
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
parallel:
|
||||
matrix:
|
||||
- IMAGE:
|
||||
- debian:trixie-slim # EOL: t.b.a.
|
||||
- debian:bookworm-slim # EOL: June 06, 2026
|
||||
- debian:bookworm-slim # EOL: June 06, 2026
|
||||
- ubuntu:24.04 # EOL: April 2036
|
||||
- ubuntu:24.10
|
||||
needs:
|
||||
- job: build:apt
|
||||
artifacts: true
|
||||
@@ -204,16 +214,6 @@ test:
|
||||
- apt-get purge -qq -y fastapi-dls
|
||||
- apt-get autoremove -qq -y && apt-get clean -qq
|
||||
|
||||
test:apt:
|
||||
extends: .test:apt
|
||||
image: $IMAGE
|
||||
parallel:
|
||||
matrix:
|
||||
- IMAGE:
|
||||
- debian:bookworm-slim # EOL: June 06, 2026
|
||||
- ubuntu:24.04 # EOL: April 2036
|
||||
- ubuntu:24.10
|
||||
|
||||
test:pacman:archlinux:
|
||||
image: archlinux:base
|
||||
rules:
|
||||
@@ -296,15 +296,12 @@ gemnasium-python-dependency_scanning:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
|
||||
.deploy:
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
|
||||
deploy:docker:
|
||||
extends: .deploy
|
||||
image: docker:dind
|
||||
stage: deploy
|
||||
tags: [ docker ]
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
before_script:
|
||||
- echo "Building docker image for commit $CI_COMMIT_SHA with version $CI_COMMIT_REF_NAME"
|
||||
- docker buildx inspect
|
||||
@@ -323,9 +320,10 @@ deploy:docker:
|
||||
|
||||
deploy:apt:
|
||||
# doc: https://git.collinwebdesigns.de/help/user/packages/debian_repository/index.md#install-a-package
|
||||
extends: .deploy
|
||||
image: debian:bookworm-slim
|
||||
stage: deploy
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
needs:
|
||||
- job: build:apt
|
||||
artifacts: true
|
||||
@@ -362,9 +360,10 @@ deploy:apt:
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${EXPORT_NAME} "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${PACKAGE_VERSION}/${EXPORT_NAME}"'
|
||||
|
||||
deploy:pacman:
|
||||
extends: .deploy
|
||||
image: archlinux:base-devel
|
||||
stage: deploy
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
needs:
|
||||
- job: build:pacman
|
||||
artifacts: true
|
||||
@@ -385,7 +384,7 @@ deploy:pacman:
|
||||
release:
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
stage: .post
|
||||
needs: [ test ]
|
||||
needs: [ build:docker, build:apt, build:pacman ]
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
fastapi==0.115.12
|
||||
uvicorn[standard]==0.34.0
|
||||
uvicorn[standard]==0.34.1
|
||||
python-jose[cryptography]==3.4.0
|
||||
cryptography==44.0.2
|
||||
python-dateutil==2.9.0
|
||||
sqlalchemy==2.0.40
|
||||
markdown==3.7
|
||||
markdown==3.8
|
||||
python-dotenv==1.1.0
|
||||
|
||||
Reference in New Issue
Block a user