Compare commits
2 Commits
09a9e0f066
...
ac90dff43a
| Author | SHA1 | Date | |
|---|---|---|---|
| ac90dff43a | |||
| 6945efb41a |
@@ -11,8 +11,8 @@ on:
|
|||||||
- cron: '0 */6 * * *' # Every 6 hours for docs generation
|
- cron: '0 */6 * * *' # Every 6 hours for docs generation
|
||||||
|
|
||||||
env:
|
env:
|
||||||
POETRY_VERSION: 1.7.1
|
POETRY_VERSION: 1.8.0
|
||||||
PYTHON_VERSION: "3.10"
|
PYTHON_VERSION: "3.13"
|
||||||
REGISTRY: ${{ vars.PACKAGES_REGISTRY }}
|
REGISTRY: ${{ vars.PACKAGES_REGISTRY }}
|
||||||
IMAGE_NAME: ${{ gitea.repository }}
|
IMAGE_NAME: ${{ gitea.repository }}
|
||||||
|
|
||||||
@@ -57,28 +57,14 @@ jobs:
|
|||||||
name: Run Tests
|
name: Run Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: lint
|
needs: lint
|
||||||
|
|
||||||
services:
|
services:
|
||||||
redis:
|
mongodb:
|
||||||
image: redis:7-alpine
|
image: mongo:7-jammy
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 27017:27017
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "redis-cli ping"
|
--health-cmd "mongosh --eval 'db.adminCommand(\"ping\")'"
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
|
|
||||||
postgres:
|
|
||||||
image: postgres:15-alpine
|
|
||||||
env:
|
|
||||||
POSTGRES_DB: testdb
|
|
||||||
POSTGRES_USER: test
|
|
||||||
POSTGRES_PASSWORD: test
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
options: >-
|
|
||||||
--health-cmd pg_isready
|
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
@@ -105,8 +91,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgresql://test:test@localhost:5432/testdb
|
MONGODB_URL: mongodb://localhost:27017
|
||||||
REDIS_URL: redis://localhost:6379/0
|
MONGODB_DATABASE: testdb
|
||||||
run: |
|
run: |
|
||||||
poetry run pytest tests/unit -v --cov --cov-report=xml --cov-report=html
|
poetry run pytest tests/unit -v --cov --cov-report=xml --cov-report=html
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|||||||
2
.github/workflows/build-deploy.yml
vendored
2
.github/workflows/build-deploy.yml
vendored
@@ -26,7 +26,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
DOCKER_REGISTRY: ghcr.io
|
DOCKER_REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}/docs-server
|
IMAGE_NAME: ${{ github.repository }}/docs-server
|
||||||
PYTHON_VERSION: '3.11'
|
PYTHON_VERSION: '3.13'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Job 1: Linting e validazione
|
# Job 1: Linting e validazione
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ stages:
|
|||||||
- docs
|
- docs
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
POETRY_VERSION: "1.7.1"
|
POETRY_VERSION: "1.8.0"
|
||||||
PYTHON_VERSION: "3.10"
|
PYTHON_VERSION: "3.13"
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
DOCKER_TLS_CERTDIR: "/certs"
|
DOCKER_TLS_CERTDIR: "/certs"
|
||||||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
||||||
@@ -65,14 +65,10 @@ test:unit:
|
|||||||
extends: .python-base
|
extends: .python-base
|
||||||
stage: test
|
stage: test
|
||||||
services:
|
services:
|
||||||
- redis:7-alpine
|
- mongo:7-jammy
|
||||||
- postgres:15-alpine
|
|
||||||
variables:
|
variables:
|
||||||
POSTGRES_DB: testdb
|
MONGODB_URL: mongodb://mongo:27017
|
||||||
POSTGRES_USER: test
|
MONGODB_DATABASE: testdb
|
||||||
POSTGRES_PASSWORD: test
|
|
||||||
REDIS_URL: redis://redis:6379/0
|
|
||||||
DATABASE_URL: postgresql://test:test@postgres:5432/testdb
|
|
||||||
script:
|
script:
|
||||||
- poetry run pytest tests/unit -v --cov --cov-report=xml --cov-report=term
|
- poetry run pytest tests/unit -v --cov --cov-report=xml --cov-report=term
|
||||||
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
|
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
|
||||||
@@ -93,14 +89,10 @@ test:integration:
|
|||||||
extends: .python-base
|
extends: .python-base
|
||||||
stage: test
|
stage: test
|
||||||
services:
|
services:
|
||||||
- redis:7-alpine
|
- mongo:7-jammy
|
||||||
- postgres:15-alpine
|
|
||||||
variables:
|
variables:
|
||||||
POSTGRES_DB: testdb
|
MONGODB_URL: mongodb://mongo:27017
|
||||||
POSTGRES_USER: test
|
MONGODB_DATABASE: testdb
|
||||||
POSTGRES_PASSWORD: test
|
|
||||||
REDIS_URL: redis://redis:6379/0
|
|
||||||
DATABASE_URL: postgresql://test:test@postgres:5432/testdb
|
|
||||||
script:
|
script:
|
||||||
- poetry run pytest tests/integration -v
|
- poetry run pytest tests/integration -v
|
||||||
only:
|
only:
|
||||||
|
|||||||
Reference in New Issue
Block a user