Skip to content

Commit b876a94

Browse files
committed
update CI to include RQ variants
1 parent a9df03b commit b876a94

File tree

1 file changed

+61
-7
lines changed

1 file changed

+61
-7
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,24 @@ jobs:
210210
include:
211211
- node-version: 22
212212
test-filter: "**"
213+
clerk-use-rq: "false"
214+
run-name: "All packages (CLERK_USE_RQ=false)"
215+
- node-version: 22
216+
test-filter: "--filter=@clerk/shared"
217+
clerk-use-rq: "false"
218+
run-name: "@clerk/shared (CLERK_USE_RQ=false)"
219+
- node-version: 22
220+
test-filter: "--filter=@clerk/shared"
221+
clerk-use-rq: "true"
222+
run-name: "@clerk/shared (CLERK_USE_RQ=true)"
223+
- node-version: 22
224+
test-filter: "--filter=@clerk/clerk-js"
225+
clerk-use-rq: "false"
226+
run-name: "@clerk/clerk-js (CLERK_USE_RQ=false)"
227+
- node-version: 22
228+
test-filter: "--filter=@clerk/clerk-js"
229+
clerk-use-rq: "true"
230+
run-name: "@clerk/clerk-js (CLERK_USE_RQ=true)"
213231

214232
steps:
215233
- name: Checkout Repo
@@ -229,22 +247,35 @@ jobs:
229247
turbo-team: ${{ vars.TURBO_TEAM }}
230248
turbo-token: ${{ secrets.TURBO_TOKEN }}
231249

250+
- name: Rebuild @clerk/shared with CLERK_USE_RQ=true
251+
if: ${{ matrix.clerk-use-rq == 'true' }}
252+
run: pnpm turbo build $TURBO_ARGS --filter=@clerk/shared --force
253+
env:
254+
CLERK_USE_RQ: true
255+
256+
- name: Rebuild dependent packages with CLERK_USE_RQ=true
257+
if: ${{ matrix.clerk-use-rq == 'true' }}
258+
run: pnpm turbo build $TURBO_ARGS --filter=@clerk/shared^... --force
259+
env:
260+
CLERK_USE_RQ: true
261+
232262
- name: Run tests in packages
233263
run: |
234264
if [ "${{ matrix.test-filter }}" = "**" ]; then
235265
echo "Running full test suite on Node ${{ matrix.node-version }}."
236266
pnpm turbo test $TURBO_ARGS
237267
else
238-
echo "Running LTS subset on Node ${{ matrix.node-version }}."
268+
echo "Running tests: ${{ matrix.run-name }}"
239269
pnpm turbo test $TURBO_ARGS ${{ matrix.test-filter }}
240270
fi
241271
env:
242272
NODE_VERSION: ${{ matrix.node-version }}
273+
CLERK_USE_RQ: ${{ matrix.clerk-use-rq }}
243274

244275
- name: Run Typedoc tests
245276
run: |
246-
# Only run Typedoc tests for one matrix version
247-
if [ "${{ matrix.node-version }}" == "22" ]; then
277+
# Only run Typedoc tests for one matrix version and main test run
278+
if [ "${{ matrix.node-version }}" == "22" ] && [ "${{ matrix.test-filter }}" = "**" ]; then
248279
pnpm test:typedoc
249280
fi
250281
env:
@@ -255,7 +286,7 @@ jobs:
255286
if: ${{ env.TURBO_SUMMARIZE == 'true' }}
256287
continue-on-error: true
257288
with:
258-
name: turbo-summary-report-unit-${{ github.run_id }}-${{ github.run_attempt }}-node-${{ matrix.node-version }}
289+
name: turbo-summary-report-unit-${{ github.run_id }}-${{ github.run_attempt }}-node-${{ matrix.node-version }}-${{ matrix.clerk-use-rq || 'default' }}
259290
path: .turbo/runs
260291
retention-days: 5
261292

@@ -291,18 +322,28 @@ jobs:
291322
'vue',
292323
'nuxt',
293324
'react-router',
294-
'billing',
295325
'machine',
296326
'custom',
297327
]
298328
test-project: ["chrome"]
299329
include:
330+
- test-name: 'billing'
331+
test-project: 'chrome'
332+
clerk-use-rq: 'false'
333+
- test-name: 'billing'
334+
test-project: 'chrome'
335+
clerk-use-rq: 'true'
300336
- test-name: 'nextjs'
301337
test-project: 'chrome'
302338
next-version: '14'
303339
- test-name: 'nextjs'
304340
test-project: 'chrome'
305341
next-version: '15'
342+
clerk-use-rq: 'false'
343+
- test-name: 'nextjs'
344+
test-project: 'chrome'
345+
next-version: '15'
346+
clerk-use-rq: 'true'
306347
- test-name: 'nextjs'
307348
test-project: 'chrome'
308349
next-version: '16'
@@ -360,12 +401,24 @@ jobs:
360401
echo "affected=${AFFECTED}"
361402
echo "affected=${AFFECTED}" >> $GITHUB_OUTPUT
362403
404+
- name: Rebuild @clerk/shared with CLERK_USE_RQ=true
405+
if: ${{ steps.task-status.outputs.affected == '1' && matrix.clerk-use-rq == 'true' }}
406+
run: pnpm turbo build $TURBO_ARGS --filter=@clerk/shared --force
407+
env:
408+
CLERK_USE_RQ: true
409+
410+
- name: Rebuild dependent packages with CLERK_USE_RQ=true
411+
if: ${{ steps.task-status.outputs.affected == '1' && matrix.clerk-use-rq == 'true' }}
412+
run: pnpm turbo build $TURBO_ARGS --filter=@clerk/shared^... --force
413+
env:
414+
CLERK_USE_RQ: true
415+
363416
- name: Verdaccio
364417
if: ${{ steps.task-status.outputs.affected == '1' }}
365418
uses: ./.github/actions/verdaccio
366419
with:
367420
publish-cmd: |
368-
if [ "$(pnpm config get registry)" = "https://registry.npmjs.org/" ]; then echo 'Error: Using default registry' && exit 1; else pnpm turbo build $TURBO_ARGS --only && pnpm changeset publish --no-git-tag; fi
421+
if [ "$(pnpm config get registry)" = "https://registry.npmjs.org/" ]; then echo 'Error: Using default registry' && exit 1; else CLERK_USE_RQ=${{ matrix.clerk-use-rq }} pnpm turbo build $TURBO_ARGS --only && pnpm changeset publish --no-git-tag; fi
369422
370423
- name: Edit .npmrc [link-workspace-packages=false]
371424
run: sed -i -E 's/link-workspace-packages=(deep|true)/link-workspace-packages=false/' .npmrc
@@ -425,6 +478,7 @@ jobs:
425478
E2E_NEXTJS_VERSION: ${{ matrix.next-version }}
426479
E2E_PROJECT: ${{ matrix.test-project }}
427480
E2E_CLERK_ENCRYPTION_KEY: ${{ matrix.clerk-encryption-key }}
481+
CLERK_USE_RQ: ${{ matrix.clerk-use-rq }}
428482
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
429483
MAILSAC_API_KEY: ${{ secrets.MAILSAC_API_KEY }}
430484
NODE_EXTRA_CA_CERTS: ${{ github.workspace }}/integration/certs/rootCA.pem
@@ -433,7 +487,7 @@ jobs:
433487
if: ${{ cancelled() || failure() }}
434488
uses: actions/upload-artifact@v4
435489
with:
436-
name: playwright-traces-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.test-name }}
490+
name: playwright-traces-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.test-name }}${{ matrix.next-version && format('-next{0}', matrix.next-version) || '' }}${{ matrix.clerk-use-rq && format('-rq{0}', matrix.clerk-use-rq) || '' }}
437491
path: integration/test-results
438492
retention-days: 1
439493

0 commit comments

Comments
 (0)