mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Run email queue in E2E tests
This commit is contained in:
parent
300904c1bc
commit
64c02cbd98
9
.github/workflows/e2e-api-tests.yaml
vendored
9
.github/workflows/e2e-api-tests.yaml
vendored
@ -131,6 +131,15 @@ jobs:
|
||||
tail: true
|
||||
wait-for: 30s
|
||||
log-output-if: true
|
||||
- name: Start run-email-queue in background
|
||||
uses: JarvusInnovations/background-action@v1.0.7
|
||||
with:
|
||||
run: pnpm run run-email-queue --log-order=stream &
|
||||
wait-on: |
|
||||
http://localhost:8102
|
||||
tail: true
|
||||
wait-for: 30s
|
||||
log-output-if: true
|
||||
|
||||
- name: Wait 10 seconds
|
||||
run: sleep 10
|
||||
|
||||
@ -125,6 +125,15 @@ jobs:
|
||||
tail: true
|
||||
wait-for: 30s
|
||||
log-output-if: true
|
||||
- name: Start run-email-queue in background
|
||||
uses: JarvusInnovations/background-action@v1.0.7
|
||||
with:
|
||||
run: pnpm run run-email-queue --log-order=stream &
|
||||
wait-on: |
|
||||
http://localhost:8102
|
||||
tail: true
|
||||
wait-for: 30s
|
||||
log-output-if: true
|
||||
|
||||
- name: Wait 10 seconds
|
||||
run: sleep 10
|
||||
|
||||
@ -131,6 +131,15 @@ jobs:
|
||||
tail: true
|
||||
wait-for: 30s
|
||||
log-output-if: true
|
||||
- name: Start run-email-queue in background
|
||||
uses: JarvusInnovations/background-action@v1.0.7
|
||||
with:
|
||||
run: pnpm run run-email-queue --log-order=stream &
|
||||
wait-on: |
|
||||
http://localhost:8102
|
||||
tail: true
|
||||
wait-for: 30s
|
||||
log-output-if: true
|
||||
|
||||
- name: Wait 10 seconds
|
||||
run: sleep 10
|
||||
|
||||
49
.github/workflows/setup-tests-with-custom-base-port.yaml
vendored
Normal file
49
.github/workflows/setup-tests-with-custom-base-port.yaml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: "Run setup tests with custom base port"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
|
||||
|
||||
env:
|
||||
SHELL: /usr/bin/bash
|
||||
|
||||
jobs:
|
||||
setup-tests-with-custom-base-port:
|
||||
runs-on: ubicloud-standard-8
|
||||
env:
|
||||
NEXT_PUBLIC_STACK_PORT_PREFIX: "69"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Node.js v20
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Install packages
|
||||
run: pnpm install
|
||||
|
||||
- run: pnpm run build:packages
|
||||
- run: pnpm run codegen
|
||||
- run: pnpm run start-deps
|
||||
|
||||
- uses: JarvusInnovations/background-action@v1.0.7
|
||||
with:
|
||||
run: pnpm run dev &
|
||||
wait-on: |
|
||||
http://localhost:8102
|
||||
tail: true
|
||||
wait-for: 120s
|
||||
log-output-if: true
|
||||
- run: pnpm run test --reporter=verbose
|
||||
@ -42,7 +42,5 @@ describe("/api/v1/internal/metrics performance", () => {
|
||||
for (let i = 0; i < 3; i++) {
|
||||
results.push(await measure());
|
||||
}
|
||||
console.log("results", results);
|
||||
console.log("average", results.reduce((a, b) => a + b, 0) / results.length);
|
||||
});
|
||||
});
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
"build:docs": "pnpm run build:packages && pnpm run build:backend && turbo run generate-openapi-fumadocs && pnpm run --filter=@stackframe/stack-docs generate-openapi-docs && turbo run build --filter=@stackframe/stack-docs",
|
||||
"build:packages": "pnpm pre && turbo run build --filter=./packages/*",
|
||||
"restart-dev-in-background": "pnpm pre && pnpm run kill-dev:named && (pnpm run dev:named > dev-server.log.untracked.txt 2>&1 &) && echo 'Starting dev server in background... (Logs are in dev-server.log.untracked.txt)' && pnpx wait-on http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02 -t 120000 && echo 'Dev server running.'",
|
||||
"restart-dev-environment": "pnpm pre && concurrently \"pnpm run build:packages && pnpm run codegen\" \"pnpm run restart-deps\" && pnpm run restart-dev-in-background",
|
||||
"restart-dev-environment": "pnpm pre && pnpm run build:packages && pnpm run codegen && pnpm run restart-deps && pnpm run restart-dev-in-background",
|
||||
"stop-dev-environment": "pnpm pre && pnpm run kill-dev:named && pnpm run stop-deps",
|
||||
"clean": "pnpm pre-no-codegen && turbo run clean && rimraf --glob **/.next && rimraf --glob **/.turbo && rimraf .turbo && rimraf --glob **/node_modules",
|
||||
"codegen": "pnpm pre && turbo run codegen && pnpm run generate-sdks && pnpm run generate-openapi-fumadocs",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user