Skip to content

Commit 341fcd6

Browse files
authored
chore(repo): Test task cache, instance cleanup (clerk#4385)
1 parent 5be7ca9 commit 341fcd6

3 files changed

Lines changed: 22 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ jobs:
139139
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_LONG && fromJSON(vars.TIMEOUT_MINUTES_LONG) || 15 }}
140140

141141
strategy:
142+
fail-fast: false
142143
matrix:
143144
test-name: ['generic', 'express', 'quickstart', 'ap-flows', 'elements', 'sessions', 'astro', 'expo-web', 'tanstack-start', 'tanstack-router']
144145
test-project: ['chrome']

integration/cleanup/cleanup.setup.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ import { test as setup } from '@playwright/test';
55
import { appConfigs } from '../presets/';
66

77
setup('cleanup instances ', async () => {
8-
const entries = Object.values(appConfigs.envs)
9-
.map(e => e.toJson())
10-
.map(json => {
11-
const secretKey = json.private['CLERK_SECRET_KEY'];
8+
const entries = Array.from(appConfigs.secrets.instanceKeys.values())
9+
.map(({ sk }) => {
10+
const secretKey = sk;
1211
if (!secretKey) {
1312
return null;
1413
}
15-
return { secretKey, apiUrl: json.private['CLERK_API_URL'] };
14+
return { secretKey };
1615
})
1716
.filter(Boolean);
1817

1918
for (const entry of entries) {
2019
console.log(`Cleanup for ${entry!.secretKey.replace(/(sk_test_)(.+)(...)/, '$1***$3')}`);
21-
const clerkClient = createClerkClient({ secretKey: entry!.secretKey, apiUrl: entry?.apiUrl });
20+
const clerkClient = createClerkClient({ secretKey: entry!.secretKey });
2221
const { data: users } = await clerkClient.users.getUserList({
2322
orderBy: '-created_at',
2423
query: 'clerkcookie',

turbo.json

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -136,84 +136,79 @@
136136
"outputs": []
137137
},
138138
"//#test:integration:ap-flows": {
139-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/nextjs#build"],
139+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/nextjs#build"],
140140
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
141141
"inputs": ["integration/**"],
142142
"outputLogs": "new-only"
143143
},
144144
"//#test:integration:generic": {
145-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/clerk-react#build"],
145+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/clerk-react#build"],
146146
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
147147
"inputs": ["integration/**"],
148148
"outputLogs": "new-only"
149149
},
150150
"//#test:integration:express": {
151151
"dependsOn": [
152-
"^@clerk/clerk-js#build",
153-
"^@clerk/backend#build",
154-
"^@clerk/clerk-sdk-node#build",
155-
"^@clerk/clerk-react#build"
152+
"@clerk/clerk-js#build",
153+
"@clerk/backend#build",
154+
"@clerk/clerk-sdk-node#build",
155+
"@clerk/express#build",
156+
"@clerk/clerk-react#build"
156157
],
157158
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
158159
"inputs": ["integration/**"],
159160
"outputLogs": "new-only"
160161
},
161162
"//#test:integration:nextjs": {
162-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/nextjs#build"],
163+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/nextjs#build"],
163164
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
164165
"inputs": ["integration/**"],
165166
"outputLogs": "new-only"
166167
},
167168
"//#test:integration:nextjs:canary": {
168-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/nextjs#build"],
169+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/nextjs#build"],
169170
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
170171
"inputs": ["integration/**"],
171172
"outputLogs": "new-only"
172173
},
173174
"//#test:integration:quickstart": {
174-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/nextjs#build"],
175+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/nextjs#build"],
175176
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
176177
"inputs": ["integration/**"],
177178
"outputLogs": "new-only"
178179
},
179180
"//#test:integration:astro": {
180-
"cache": false,
181-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/astro#build"],
181+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/astro#build"],
182182
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
183183
"inputs": ["integration/**"],
184184
"outputLogs": "new-only"
185185
},
186186
"//#test:integration:sessions": {
187-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/nextjs#build"],
187+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/nextjs#build"],
188188
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS"],
189189
"inputs": ["integration/**"],
190190
"outputLogs": "new-only"
191191
},
192192
"//#test:integration:elements": {
193-
"dependsOn": [
194-
"^@clerk/clerk-js#build",
195-
"^@clerk/backend#build",
196-
"^@clerk/nextjs#build",
197-
"^@clerk/elements#build"
198-
],
193+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/nextjs#build", "@clerk/elements#build"],
199194
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
200195
"inputs": ["integration/**"],
201196
"outputLogs": "new-only"
202197
},
203198
"//#test:integration:expo-web": {
204-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/clerk-expo#build", "^@clerk/clerk-react#build"],
199+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/clerk-expo#build", "@clerk/clerk-react#build"],
205200
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
206201
"inputs": ["integration/**"],
207202
"outputLogs": "new-only"
208203
},
209204
"//#test:integration:tanstack-start": {
210-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/tanstack-start#build", "^@clerk/clerk-react#build"],
205+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/tanstack-start#build", "@clerk/clerk-react#build"],
211206
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
212207
"inputs": ["integration/**"],
213208
"outputLogs": "new-only"
214209
},
215210
"//#test:integration:tanstack-router": {
216-
"dependsOn": ["^@clerk/clerk-js#build", "^@clerk/tanstack-start#build", "^@clerk/clerk-react#build"],
211+
"dependsOn": ["@clerk/clerk-js#build", "@clerk/tanstack-start#build", "@clerk/clerk-react#build"],
217212
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
218213
"inputs": ["integration/**"],
219214
"outputLogs": "new-only"

0 commit comments

Comments
 (0)