mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2026-04-05 09:15:48 +03:00
Compare commits
2 Commits
21d052523f
...
af8b1c2387
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af8b1c2387 | ||
|
|
d37d96dc34 |
@@ -1,7 +1,11 @@
|
|||||||
|
version: "2"
|
||||||
plugins:
|
plugins:
|
||||||
bandit:
|
bandit:
|
||||||
enabled: true
|
enabled: true
|
||||||
sonar-python:
|
sonar-python:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
config:
|
||||||
|
tests_patterns:
|
||||||
|
- test/**
|
||||||
pylint:
|
pylint:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -242,10 +242,22 @@ semgrep-sast:
|
|||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
|
||||||
test_coverage:
|
test_coverage:
|
||||||
extends: test
|
# extends: test
|
||||||
|
image: python:3.11-slim-bookworm
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
stage: test
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
variables:
|
||||||
|
DATABASE: sqlite:///../app/db.sqlite
|
||||||
|
before_script:
|
||||||
|
- apt-get update && apt-get install -y python3-dev gcc
|
||||||
|
- pip install -r requirements.txt
|
||||||
|
- pip install pytest httpx
|
||||||
|
- mkdir -p app/cert
|
||||||
|
- openssl genrsa -out app/cert/instance.private.pem 2048
|
||||||
|
- openssl rsa -in app/cert/instance.private.pem -outform PEM -pubout -out app/cert/instance.public.pem
|
||||||
|
- cd test
|
||||||
script:
|
script:
|
||||||
- pip install pytest pytest-cov
|
- pip install pytest pytest-cov
|
||||||
- coverage run -m pytest main.py
|
- coverage run -m pytest main.py
|
||||||
|
|||||||
Reference in New Issue
Block a user