diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5415829..09013e8 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -11,8 +11,8 @@ on: - cron: '0 */6 * * *' # Every 6 hours for docs generation env: - POETRY_VERSION: 1.7.1 - PYTHON_VERSION: "3.10" + POETRY_VERSION: 1.8.0 + PYTHON_VERSION: "3.13" REGISTRY: ${{ vars.PACKAGES_REGISTRY }} IMAGE_NAME: ${{ gitea.repository }} @@ -57,28 +57,14 @@ jobs: name: Run Tests runs-on: ubuntu-latest needs: lint - + services: - redis: - image: redis:7-alpine + mongodb: + image: mongo:7-jammy ports: - - 6379:6379 + - 27017:27017 options: >- - --health-cmd "redis-cli 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-cmd "mongosh --eval 'db.adminCommand(\"ping\")'" --health-interval 10s --health-timeout 5s --health-retries 5 @@ -105,8 +91,8 @@ jobs: - name: Run unit tests env: - DATABASE_URL: postgresql://test:test@localhost:5432/testdb - REDIS_URL: redis://localhost:6379/0 + MONGODB_URL: mongodb://localhost:27017 + MONGODB_DATABASE: testdb run: | poetry run pytest tests/unit -v --cov --cov-report=xml --cov-report=html continue-on-error: true diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index ef3a93e..2fc45a2 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -26,7 +26,7 @@ on: env: DOCKER_REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }}/docs-server - PYTHON_VERSION: '3.11' + PYTHON_VERSION: '3.13' jobs: # Job 1: Linting e validazione