Skip to content

Commit ba88e99

Browse files
committed
Merge remote-tracking branch 'origin/dev' into saved-queries
2 parents f10e0c9 + 4c6a89f commit ba88e99

191 files changed

Lines changed: 17989 additions & 3912 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/db-migration-backwards-compatibility.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,17 @@ jobs:
193193
wait-for: 30s
194194
log-output-if: true
195195

196+
- name: Start run-cron-jobs in background
197+
uses: JarvusInnovations/background-action@v1.0.7
198+
if: ${{ hashFiles('apps/backend/scripts/run-cron-jobs.ts') != '' }}
199+
with:
200+
run: pnpm -C apps/backend run with-env:dev tsx scripts/run-cron-jobs.ts --log-order=stream &
201+
wait-on: |
202+
http://localhost:8102
203+
tail: true
204+
wait-for: 30s
205+
log-output-if: true
206+
196207
- name: Wait 10 seconds
197208
run: sleep 10
198209

@@ -230,4 +241,3 @@ jobs:
230241
steps:
231242
- name: No migration changes detected
232243
run: echo "No changes to migrations folder detected. Skipping backwards compatibility test."
233-

.github/workflows/docker-server-build-run.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Run Docker container and check logs
3737
run: |
3838
docker run --add-host=host.docker.internal:host-gateway --env-file docker/server/.env.example -p 8101:8101 -p 8102:8102 -d --name stackframe-server server
39-
sleep 60
39+
sleep 120
4040
docker logs -t stackframe-server
4141
4242
- name: Check server health

.github/workflows/e2e-api-tests.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
NODE_ENV: test
2020
STACK_ENABLE_HARDCODED_PASSKEY_CHALLENGE_FOR_TESTING: yes
2121
STACK_DATABASE_CONNECTION_STRING: "postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:8128/stackframe"
22+
STACK_EXTERNAL_DB_SYNC_MAX_DURATION_MS: "20000"
23+
STACK_EXTERNAL_DB_SYNC_DIRECT: "false"
2224

2325
strategy:
2426
matrix:
@@ -100,6 +102,9 @@ jobs:
100102

101103
- name: Wait on Svix
102104
run: pnpx wait-on tcp:localhost:8113
105+
106+
- name: Wait on QStash
107+
run: pnpx wait-on tcp:localhost:8125
103108

104109
- name: Initialize database
105110
run: pnpm run db:init
@@ -140,20 +145,29 @@ jobs:
140145
tail: true
141146
wait-for: 30s
142147
log-output-if: true
148+
- name: Start run-cron-jobs in background
149+
uses: JarvusInnovations/background-action@v1.0.7
150+
with:
151+
run: pnpm -C apps/backend run run-cron-jobs:test --log-order=stream &
152+
wait-on: |
153+
http://localhost:8102
154+
tail: true
155+
wait-for: 30s
156+
log-output-if: true
143157

144158
- name: Wait 10 seconds
145159
run: sleep 10
146160

147161
- name: Run tests
148-
run: pnpm test ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
162+
run: pnpm test run ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }} ${{ matrix.freestyle-mode == 'prod' && github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' && 'mail' || '' }}
149163

150-
- name: Run tests again, to make sure they are stable (attempt 1)
164+
- name: Run tests again (attempt 1)
151165
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
152-
run: pnpm test ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
166+
run: pnpm test run ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
153167

154-
- name: Run tests again, to make sure they are stable (attempt 2)
168+
- name: Run tests again (attempt 2)
155169
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
156-
run: pnpm test ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
170+
run: pnpm test run ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
157171

158172
- name: Verify data integrity
159173
run: pnpm run verify-data-integrity --no-bail

.github/workflows/e2e-custom-base-port-api-tests.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
STACK_ENABLE_HARDCODED_PASSKEY_CHALLENGE_FOR_TESTING: yes
2020
STACK_DATABASE_CONNECTION_STRING: "postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:6728/stackframe"
2121
NEXT_PUBLIC_STACK_PORT_PREFIX: "67"
22+
STACK_EXTERNAL_DB_SYNC_MAX_DURATION_MS: "20000"
23+
STACK_EXTERNAL_DB_SYNC_DIRECT: "false"
2224

2325
strategy:
2426
matrix:
@@ -94,6 +96,9 @@ jobs:
9496

9597
- name: Wait on Svix
9698
run: pnpx wait-on tcp:localhost:6713
99+
100+
- name: Wait on QStash
101+
run: pnpx wait-on tcp:localhost:6725
97102

98103
- name: Initialize database
99104
run: pnpm run db:init
@@ -134,20 +139,29 @@ jobs:
134139
tail: true
135140
wait-for: 30s
136141
log-output-if: true
142+
- name: Start run-cron-jobs in background
143+
uses: JarvusInnovations/background-action@v1.0.7
144+
with:
145+
run: pnpm -C apps/backend run run-cron-jobs --log-order=stream &
146+
wait-on: |
147+
http://localhost:6702
148+
tail: true
149+
wait-for: 30s
150+
log-output-if: true
137151

138152
- name: Wait 10 seconds
139153
run: sleep 10
140154

141155
- name: Run tests
142-
run: pnpm test
156+
run: pnpm test run
143157

144-
- name: Run tests again, to make sure they are stable (attempt 1)
158+
- name: Run tests again (attempt 1)
145159
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
146-
run: pnpm test
160+
run: pnpm test run
147161

148-
- name: Run tests again, to make sure they are stable (attempt 2)
162+
- name: Run tests again (attempt 2)
149163
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
150-
run: pnpm test
164+
run: pnpm test run
151165

152166
- name: Verify data integrity
153167
run: pnpm run verify-data-integrity --no-bail

.github/workflows/e2e-source-of-truth-api-tests.yaml

Lines changed: 0 additions & 163 deletions
This file was deleted.

.github/workflows/restart-dev-and-test-with-custom-base-port.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
runs-on: ubicloud-standard-16
2020
env:
2121
NEXT_PUBLIC_STACK_PORT_PREFIX: "69"
22+
STACK_EXTERNAL_DB_SYNC_MAX_DURATION_MS: "20000"
23+
STACK_EXTERNAL_DB_SYNC_DIRECT: "false"
2224

2325
steps:
2426
- uses: actions/checkout@v6
@@ -38,7 +40,7 @@ jobs:
3840
run: pnpm run restart-dev-environment
3941

4042
- name: Run tests
41-
run: pnpm run test --reporter=verbose
43+
run: pnpm run test run --reporter=verbose
4244

4345
- name: Print dev server logs
4446
run: cat dev-server.log.untracked.txt

.github/workflows/restart-dev-and-test.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ env:
1717
jobs:
1818
restart-dev-and-test:
1919
runs-on: ubicloud-standard-16
20+
env:
21+
STACK_EXTERNAL_DB_SYNC_MAX_DURATION_MS: "20000"
22+
STACK_EXTERNAL_DB_SYNC_DIRECT: "false"
2023

2124
steps:
2225
- uses: actions/checkout@v6
@@ -36,7 +39,7 @@ jobs:
3639
run: pnpm run restart-dev-environment
3740

3841
- name: Run tests
39-
run: pnpm run test --reporter=verbose
42+
run: pnpm run test run --reporter=verbose
4043

4144
- name: Print dev server logs
4245
run: cat dev-server.log.untracked.txt

.github/workflows/setup-tests-with-custom-base-port.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
runs-on: ubicloud-standard-16
2020
env:
2121
NEXT_PUBLIC_STACK_PORT_PREFIX: "69"
22+
STACK_EXTERNAL_DB_SYNC_MAX_DURATION_MS: "20000"
23+
STACK_EXTERNAL_DB_SYNC_DIRECT: "false"
2224

2325
steps:
2426
- uses: actions/checkout@v6
@@ -46,4 +48,5 @@ jobs:
4648
tail: true
4749
wait-for: 120s
4850
log-output-if: true
49-
- run: pnpm run test --reporter=verbose
51+
- name: Run tests
52+
run: pnpm run test run --reporter=verbose

.github/workflows/setup-tests.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ env:
1717
jobs:
1818
setup-tests:
1919
runs-on: ubicloud-standard-16
20+
env:
21+
STACK_EXTERNAL_DB_SYNC_MAX_DURATION_MS: "20000"
22+
STACK_EXTERNAL_DB_SYNC_DIRECT: "false"
2023
steps:
2124
- uses: actions/checkout@v6
2225

@@ -43,4 +46,5 @@ jobs:
4346
tail: true
4447
wait-for: 120s
4548
log-output-if: true
46-
- run: pnpm run test --reporter=verbose
49+
- name: Run tests
50+
run: pnpm run test run --reporter=verbose

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"typescript.tsdk": "node_modules/typescript/lib",
88
"editor.tabSize": 2,
99
"cSpell.words": [
10+
"sparkline",
11+
"Clickhouse",
1012
"pushable",
1113
"autoupdate",
1214
"backlinks",
@@ -172,5 +174,6 @@
172174
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:IDEA)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": [],
173175
},
174176
"editor.formatOnSaveMode": "file",
175-
"git.ignoreLimitWarning": true
177+
"git.ignoreLimitWarning": true,
178+
"chatgpt.commentCodeLensEnabled": false
176179
}

0 commit comments

Comments
 (0)