ci: run backend integration tests as a separate manual workflow
The job was holding the runner for hours on every push and pull request. On 2026-08-18 it ran 3h12m, and because the runner is sequential it kept frontend-e2e queued behind it for that whole time. It is not a slow suite. That run executed 89 tests in 87 seconds, then logged "Jest did not exit one second after the test run has completed" and sat there until something killed it — an open handle keeping the event loop alive after the run finishes. The same run also failed with relation "orders" does not exist, so the schema was missing in CI even though globalSetup migrates. Neither is root-caused yet; both follow the job into its new home. So the new workflow carries a 15-minute timeout. The suite needs about 90 seconds, so this is not a performance budget — it is a stop that turns a post-run hang into minutes of wasted runner time rather than hours. Tests.yml keeps a comment saying where the job went, so its absence reads as deliberate rather than as something lost in an edit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
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
|
||||
@@ -1,5 +1,12 @@
|
||||
name: Tests
|
||||
|
||||
# backend-integration lives in its own manual workflow
|
||||
# (.gitea/workflows/backend-integration.yml) rather than running here. It held
|
||||
# the runner for 3h12m on 2026-08-18 — 87 seconds of tests followed by a hang
|
||||
# after the run completed — and blocked frontend-e2e behind it for the same
|
||||
# three hours. Run it from Actions before merging anything that touches the API
|
||||
# or the database.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -37,53 +44,6 @@ jobs:
|
||||
if: steps.unit.outcome == 'failure'
|
||||
run: exit 1
|
||||
|
||||
backend-integration:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
|
||||
frontend-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
|
||||
Reference in New Issue
Block a user