chore: update E2E tests workflow to capture logs on cancellation and add shared volume for backend services

This commit is contained in:
Anish Sarkar 2026-05-12 01:35:33 +05:30
parent c052fc9304
commit 315329f344
2 changed files with 9 additions and 2 deletions

View file

@ -130,7 +130,7 @@ jobs:
# ─── Failure diagnostics ─────────────────────────────────────────── # ─── Failure diagnostics ───────────────────────────────────────────
- name: Dump backend stack logs on failure - name: Dump backend stack logs on failure
if: failure() if: ${{ failure() || cancelled() }}
run: | run: |
mkdir -p ./compose-logs mkdir -p ./compose-logs
docker compose -f docker/docker-compose.e2e.yml logs --no-color --timestamps \ docker compose -f docker/docker-compose.e2e.yml logs --no-color --timestamps \
@ -160,7 +160,7 @@ jobs:
retention-days: 14 retention-days: 14
- name: Upload backend stack logs - name: Upload backend stack logs
if: failure() if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7
with: with:
name: backend-stack-logs name: backend-stack-logs

View file

@ -109,6 +109,8 @@ services:
environment: environment:
<<: *backend-env <<: *backend-env
SERVICE_ROLE: api SERVICE_ROLE: api
volumes:
- shared_temp:/shared_tmp
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
ports: ports:
@ -147,6 +149,8 @@ services:
environment: environment:
<<: *backend-env <<: *backend-env
SERVICE_ROLE: worker SERVICE_ROLE: worker
volumes:
- shared_temp:/shared_tmp
depends_on: depends_on:
backend: { condition: service_healthy } backend: { condition: service_healthy }
healthcheck: healthcheck:
@ -172,3 +176,6 @@ networks:
# redis stay off this network entirely. # redis stay off this network entirely.
ingress: ingress:
driver: bridge driver: bridge
volumes:
shared_temp: