Skip to content

Commit 8ccef7e

Browse files
committed
chore(repo): Serve clerk-js from verdaccio on CICD
1 parent 4f27c94 commit 8ccef7e

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

.github/workflows/base-e2e.yml

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
- name: Install @clerk/backend in /integration
4949
run: |
5050
cd integration && npm init -y && npm install @clerk/backend && cd ..
51+
- name: Install @clerk/clerk-js in os temp
52+
working-directory: ${{runner.temp}}
53+
run: mkdir clerk-js && cd clerk-js && npm init -y && npm install @clerk/clerk-js
5154
- name: Run Playwright tests
5255
run: ${{ inputs.SCRIPT }}
5356
env:

.github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ jobs:
124124
working-directory: ./integration
125125
run: npm init -y && npm install @clerk/backend
126126

127+
- name: Install @clerk/clerk-js in os temp
128+
working-directory: ${{runner.temp}}
129+
run: mkdir clerk-js && cd clerk-js && npm init -y && npm install @clerk/clerk-js
130+
127131
- name: Run Integration Tests
128-
run: npm run test:integration:${{ matrix.test-name }}
132+
run: E2E_APP_CLERK_JS_DIR=$RUNNER_TEMP npm run test:integration:${{ matrix.test-name }}
129133
env:
130134
E2E_CLERK_VERSION: 'latest'
131135
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}

.github/workflows/nightly-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
needs: build
1515
uses: ./.github/workflows/base-e2e.yml
1616
with:
17-
SCRIPT: 'E2E_NEXTJS_VERSION=canary npm run test:integration:nextjs'
17+
SCRIPT: 'E2E_APP_CLERK_JS_DIR=$RUNNER_TEMP E2E_NEXTJS_VERSION=canary npm run test:integration:nextjs'
1818
secrets: inherit
1919

2020
notify-slack:

integration/scripts/clerkJsServer.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export const startClerkJsHttpServer = async () => {
1414
if (!process.env.CI) {
1515
await copyClerkJsToTempDir();
1616
}
17-
await startClerkJsHttpServer();
1817
return serveFromTempDir();
1918
};
2019

@@ -37,6 +36,7 @@ const copyClerkJsToTempDir = async () => {
3736
};
3837

3938
const serveFromTempDir = async () => {
39+
console.log('Serving clerkJs from temp dir');
4040
const port = 18211;
4141
const serverUrl = `http://localhost:${port}`;
4242
const now = Date.now();
@@ -53,6 +53,7 @@ const serveFromTempDir = async () => {
5353
});
5454
stateFile.setClerkJsHttpServerPid(proc.pid);
5555
await waitForServer(serverUrl, { log: console.log, maxAttempts: Infinity });
56+
console.log('clerk.browser.js is being served from', serverUrl);
5657
};
5758

5859
// The location where the clerk.browser.js is served from

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"test:cache:clear": "FORCE_COLOR=1 turbo test:cache:clear --continue --concurrency=${TURBO_CONCURRENCY:-80%}",
3232
"test:integration:base": "DEBUG=1 npx playwright test --config integration/playwright.config.ts",
3333
"test:integration:deployment:nextjs": "DEBUG=1 npx playwright test --config integration/playwright.deployments.config.ts",
34-
"test:integration:generic": "E2E_APP_ID=react.vite.withEmailCodes npm run test:integration:base -- sign-in-smoke",
34+
"test:integration:generic": "E2E_APP_ID=react.vite.* npm run test:integration:base -- --grep @generic",
3535
"test:integration:nextjs": "E2E_APP_ID=next.appRouter.withEmailCodes npm run test:integration:base -- --grep \"@generic|@nextjs\"",
3636
"test:integration:remix": "echo 'placeholder'",
3737
"turbo:clean": "turbo daemon clean",

0 commit comments

Comments
 (0)