|
19 | 19 | NODE_ENV: test |
20 | 20 | STACK_ENABLE_HARDCODED_PASSKEY_CHALLENGE_FOR_TESTING: yes |
21 | 21 | 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" |
22 | 24 |
|
23 | 25 | strategy: |
24 | 26 | matrix: |
@@ -100,6 +102,9 @@ jobs: |
100 | 102 |
|
101 | 103 | - name: Wait on Svix |
102 | 104 | run: pnpx wait-on tcp:localhost:8113 |
| 105 | + |
| 106 | + - name: Wait on QStash |
| 107 | + run: pnpx wait-on tcp:localhost:8125 |
103 | 108 |
|
104 | 109 | - name: Initialize database |
105 | 110 | run: pnpm run db:init |
@@ -140,20 +145,29 @@ jobs: |
140 | 145 | tail: true |
141 | 146 | wait-for: 30s |
142 | 147 | 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 |
143 | 157 |
|
144 | 158 | - name: Wait 10 seconds |
145 | 159 | run: sleep 10 |
146 | 160 |
|
147 | 161 | - 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' || '' }} |
149 | 163 |
|
150 | | - - name: Run tests again, to make sure they are stable (attempt 1) |
| 164 | + - name: Run tests again (attempt 1) |
151 | 165 | 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' || '' }} |
153 | 167 |
|
154 | | - - name: Run tests again, to make sure they are stable (attempt 2) |
| 168 | + - name: Run tests again (attempt 2) |
155 | 169 | 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' || '' }} |
157 | 171 |
|
158 | 172 | - name: Verify data integrity |
159 | 173 | run: pnpm run verify-data-integrity --no-bail |
|
0 commit comments