mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
attempt test fixes
This commit is contained in:
parent
2974c83d7b
commit
0799a0b611
24
.github/workflows/e2e-api-tests.yaml
vendored
24
.github/workflows/e2e-api-tests.yaml
vendored
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
2
.github/workflows/restart-dev-and-test.yaml
vendored
2
.github/workflows/restart-dev-and-test.yaml
vendored
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
2
.github/workflows/setup-tests.yaml
vendored
2
.github/workflows/setup-tests.yaml
vendored
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user