attempt test fixes

This commit is contained in:
Bilal Godil 2026-01-30 13:11:30 -08:00
parent 2974c83d7b
commit 0799a0b611
7 changed files with 67 additions and 13 deletions

View File

@ -100,6 +100,9 @@ jobs:
- name: Wait on Svix
run: pnpx wait-on tcp:localhost:8113
- name: Wait on QStash
run: pnpx wait-on tcp:localhost:8125
- name: Initialize database
run: pnpm run db:init
@ -153,16 +156,31 @@ jobs:
- name: Wait 10 seconds
run: sleep 10
- name: Prime external DB sync
run: |
set -euo pipefail
set -a
source apps/backend/.env.test.local
set +a
baseUrl="http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02"
for _ in 1 2 3; do
curl -fsS -H "Authorization: Bearer ${CRON_SECRET}" \
"${baseUrl}/api/latest/internal/external-db-sync/sequencer" >/dev/null
curl -fsS -H "Authorization: Bearer ${CRON_SECRET}" \
"${baseUrl}/api/latest/internal/external-db-sync/poller" >/dev/null
sleep 2
done
- name: Run tests
run: pnpm test ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
run: pnpm test run ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
- name: Run tests again, to make sure they are stable (attempt 1)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
run: pnpm test ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
run: pnpm test run ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
- name: Run tests again, to make sure they are stable (attempt 2)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
run: pnpm test ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
run: pnpm test run ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
- name: Verify data integrity
run: pnpm run verify-data-integrity --no-bail

View File

@ -94,6 +94,9 @@ jobs:
- name: Wait on Svix
run: pnpx wait-on tcp:localhost:6713
- name: Wait on QStash
run: pnpx wait-on tcp:localhost:6725
- name: Initialize database
run: pnpm run db:init
@ -147,16 +150,31 @@ jobs:
- name: Wait 10 seconds
run: sleep 10
- name: Prime external DB sync
run: |
set -euo pipefail
set -a
source apps/backend/.env.test.local
set +a
baseUrl="http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02"
for _ in 1 2 3; do
curl -fsS -H "Authorization: Bearer ${CRON_SECRET}" \
"${baseUrl}/api/latest/internal/external-db-sync/sequencer" >/dev/null
curl -fsS -H "Authorization: Bearer ${CRON_SECRET}" \
"${baseUrl}/api/latest/internal/external-db-sync/poller" >/dev/null
sleep 2
done
- name: Run tests
run: pnpm test
run: pnpm test run
- name: Run tests again, to make sure they are stable (attempt 1)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
run: pnpm test
run: pnpm test run
- name: Run tests again, to make sure they are stable (attempt 2)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
run: pnpm test
run: pnpm test run
- name: Verify data integrity
run: pnpm run verify-data-integrity --no-bail

View File

@ -96,6 +96,9 @@ jobs:
- name: Wait on Svix
run: pnpx wait-on tcp:localhost:8113
- name: Wait on QStash
run: pnpx wait-on tcp:localhost:8125
- name: Create source-of-truth database and schema
run: |
@ -154,16 +157,31 @@ jobs:
- name: Wait 10 seconds
run: sleep 10
- name: Prime external DB sync
run: |
set -euo pipefail
set -a
source apps/backend/.env.test.local
set +a
baseUrl="http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02"
for _ in 1 2 3; do
curl -fsS -H "Authorization: Bearer ${CRON_SECRET}" \
"${baseUrl}/api/latest/internal/external-db-sync/sequencer" >/dev/null
curl -fsS -H "Authorization: Bearer ${CRON_SECRET}" \
"${baseUrl}/api/latest/internal/external-db-sync/poller" >/dev/null
sleep 2
done
- name: Run tests
run: pnpm test
run: pnpm test run
- name: Run tests again, to make sure they are stable (attempt 1)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
run: pnpm test
run: pnpm test run
- name: Run tests again, to make sure they are stable (attempt 2)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
run: pnpm test
run: pnpm test run
- name: Verify data integrity
run: pnpm run verify-data-integrity --no-bail

View File

@ -38,7 +38,7 @@ jobs:
run: pnpm run restart-dev-environment
- name: Run tests
run: pnpm run test --reporter=verbose
run: pnpm run test run --reporter=verbose
- name: Print dev server logs
run: cat dev-server.log.untracked.txt

View File

@ -36,7 +36,7 @@ jobs:
run: pnpm run restart-dev-environment
- name: Run tests
run: pnpm run test --reporter=verbose
run: pnpm run test run --reporter=verbose
- name: Print dev server logs
run: cat dev-server.log.untracked.txt

View File

@ -46,4 +46,4 @@ jobs:
tail: true
wait-for: 120s
log-output-if: true
- run: pnpm run test --reporter=verbose
- run: pnpm run test run --reporter=verbose

View File

@ -43,4 +43,4 @@ jobs:
tail: true
wait-for: 120s
log-output-if: true
- run: pnpm run test --reporter=verbose
- run: pnpm run test run --reporter=verbose