name: Backend Integration Tests # Split out of the Tests workflow and made manual. It was blocking every push # and pull request: on 2026-08-18 the job held the runner for 3h12m, which also # kept frontend-e2e queued behind it for the same three hours. # # The suite itself is not slow — that run executed 89 tests in 87 seconds and # then hung with "Jest did not exit one second after the test run has # completed", so something keeps the event loop alive after the run. Until that # is root-caused, this runs on demand and under a hard timeout. on: workflow_dispatch: jobs: backend-integration: runs-on: ubuntu-latest # The suite takes ~90s. This is not a performance budget — it is a stop so a # post-run hang costs minutes of runner time instead of hours. timeout-minutes: 15 services: postgres: image: postgres:16 env: POSTGRES_USER: redefined_test POSTGRES_PASSWORD: redefined_test POSTGRES_DB: redefined_test options: >- --health-cmd "pg_isready -U redefined_test" --health-interval 5s --health-timeout 5s --health-retries 10 env: TEST_PGHOST: postgres TEST_PGPORT: 5432 TEST_PGUSER: redefined_test TEST_PGPASSWORD: redefined_test TEST_PGDATABASE: redefined_test steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: '20' - name: Install deps run: npm install working-directory: backend - name: Run integration tests id: integration continue-on-error: true run: npm run test:integration:json working-directory: backend - name: Summarize if: always() run: node scripts/summarize-jest.js backend/integration-results.json "Backend Integration Test" - name: Fail job if tests failed if: steps.integration.outcome == 'failure' run: exit 1