diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5eac8d9dba..af5f49dece 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -292,18 +292,11 @@ jobs: run: docker compose exec -T appwrite vars - name: Run Unit Tests - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 60 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/unit - command: >- - docker compose exec - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/unit + timeout-minutes: 15 + run: >- + docker compose exec + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/unit e2e_general: name: Tests / E2E / General @@ -344,18 +337,11 @@ jobs: done - name: Run General Tests - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 60 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/General - command: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/General + timeout-minutes: 15 + run: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/General - name: Failure Logs if: failure() @@ -407,16 +393,20 @@ jobs: include: - service: Databases runner: blacksmith-4vcpu-ubuntu-2404 + functional: false - service: Sites runner: blacksmith-4vcpu-ubuntu-2404 - service: Functions runner: blacksmith-4vcpu-ubuntu-2404 + functional: false - service: Avatars runner: blacksmith-4vcpu-ubuntu-2404 - service: Realtime runner: blacksmith-4vcpu-ubuntu-2404 + functional: false - service: TablesDB runner: blacksmith-4vcpu-ubuntu-2404 + functional: false steps: - name: Checkout repository uses: actions/checkout@v6 @@ -453,26 +443,11 @@ jobs: done - name: Run tests - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 60 - timeout_minutes: 20 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/Services/${{ matrix.service }} - command: | - SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" - - # Services that rely on sequential test method execution (shared static state) - FUNCTIONAL_FLAG="--functional" - case "${{ matrix.service }}" in - Databases|TablesDB|Functions|Realtime) FUNCTIONAL_FLAG="" ;; - esac - - docker compose exec -T \ - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ - appwrite vendor/bin/paratest --processes $(nproc) $FUNCTIONAL_FLAG "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots --log-junit tests/e2e/Services/${{ matrix.service }}/junit.xml + timeout-minutes: 20 + run: | + docker compose exec -T \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ + appwrite vendor/bin/paratest --processes $(nproc) ${{ matrix.functional == false && '' || '--functional' }} "/usr/src/code/tests/e2e/Services/${{ matrix.service }}" --exclude-group abuseEnabled --exclude-group screenshots - name: Failure Logs if: failure() @@ -519,18 +494,11 @@ jobs: docker compose up -d --quiet-pull --wait - name: Run tests - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 60 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e - command: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e --group=abuseEnabled + timeout-minutes: 15 + run: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e --group=abuseEnabled - name: Failure Logs if: failure() @@ -584,18 +552,11 @@ jobs: done - name: Run tests - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 60 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/Services/Sites - command: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Sites --group=screenshots + timeout-minutes: 15 + run: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/Services/Sites --group=screenshots - name: Failure Logs if: failure() diff --git a/compose/postgresql.yml b/compose/postgresql.yml index 5d0d501f9f..1495ebb368 100644 --- a/compose/postgresql.yml +++ b/compose/postgresql.yml @@ -1,35 +1,3 @@ -x-logging: &x-logging - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - services: mongodb: scale: 0 - - postgresql: - image: appwrite/postgres:0.1.0 - container_name: appwrite-postgresql - <<: *x-logging - networks: - - appwrite - volumes: - - appwrite-postgresql:/var/lib/postgresql/18/data:rw - ports: - - "5432:5432" - environment: - - POSTGRES_DB=${_APP_DB_SCHEMA} - - POSTGRES_USER=${_APP_DB_USER} - - POSTGRES_PASSWORD=${_APP_DB_PASS} - healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${_APP_DB_USER} -d ${_APP_DB_SCHEMA}"] - interval: 5s - timeout: 5s - retries: 10 - start_period: 10s - command: "postgres" - -volumes: - appwrite-postgresql: diff --git a/docker-compose.yml b/docker-compose.yml index 53bf1570f2..415013db27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1261,6 +1261,28 @@ services: retries: 20 start_period: 5s + postgresql: + image: appwrite/postgres:0.1.0 + container_name: appwrite-postgresql + <<: *x-logging + networks: + - appwrite + volumes: + - appwrite-postgresql:/var/lib/postgresql/18/data:rw + ports: + - "5432:5432" + environment: + - POSTGRES_DB=${_APP_DB_SCHEMA} + - POSTGRES_USER=${_APP_DB_USER} + - POSTGRES_PASSWORD=${_APP_DB_PASS} + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${_APP_DB_USER} -d ${_APP_DB_SCHEMA}"] + interval: 5s + timeout: 5s + retries: 10 + start_period: 10s + command: "postgres" + mongodb: image: mongo:8.2.5 container_name: appwrite-mongodb @@ -1419,6 +1441,7 @@ networks: volumes: + appwrite-postgresql: appwrite-mongodb: appwrite-mongodb-keyfile: appwrite-redis: