Skip to content

Commit

Permalink
Revert Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed May 23, 2024
1 parent a117759 commit ab29eff
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 31 deletions.
24 changes: 2 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:

strategy:
matrix:
test-name: ['elements']
test-name: ['generic', 'nextjs', 'express', 'quickstart', 'ap-flows', 'elements']
test-project: ['chrome']

steps:
Expand Down Expand Up @@ -164,32 +164,12 @@ jobs:

- name: Run Integration Tests
id: integration-tests
run: npx turbo test:integration:${{ matrix.test-name }} --cache-dir=./.turbo-cache --concurrency=4 --summarize=false --verbosity=2 --log-order=stream --only -- --project=${{ matrix.test-project }}
run: npx turbo test:integration:${{ matrix.test-name }} $TURBO_ARGS --only -- --project=${{ matrix.test-project }}
env:
E2E_APP_CLERK_JS_DIR: ${{runner.temp}}
E2E_CLERK_VERSION: 'latest'
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
MAILSAC_API_KEY: ${{ secrets.MAILSAC_API_KEY }}

- name: ENV VARS ARGHHH
if: ${{ cancelled() || failure() }}
run: echo "APP_DIR_PATH=${appDirPath}" >> $GITHUB_ENV

- name: Upload test artifacts
if: ${{ cancelled() || failure() }}
uses: actions/upload-artifact@v4
with:
name: playwright-traces-${{ matrix.test-name }}
path: integration/test-results
retention-days: 1

- name: Upload tempdir artifacts
if: ${{ cancelled() || failure() }}
uses: actions/upload-artifact@v4
with:
name: temp-app-${{ matrix.test-name }}
path: /tmp/.temp_integration/long-running--elements.next.appRouter__123
retention-days: 1

# - name: Upload Integration Report for ${{ matrix.test-name }}
# uses: actions/upload-artifact@v3
Expand Down
1 change: 0 additions & 1 deletion integration/models/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const application = (config: ApplicationConfig, appDirPath: string, appDi
if (force || !nodeModulesExist) {
const log = logger.child({ prefix: 'setup' }).info;
await run(scripts.setup, { cwd: appDirPath, log });
await run(`cd node_modules/@clerk/elements && ls`, { cwd: appDirPath, log });
state.completedSetup = true;
}
},
Expand Down
5 changes: 2 additions & 3 deletions integration/models/applicationConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createLogger, fs } from '../scripts';
import { application } from './application.js';
import type { EnvironmentConfig } from './environment';
import type { Helpers } from './helpers.js';
import { helpers } from './helpers.js';
import { hash, helpers } from './helpers.js';

export type ApplicationConfig = ReturnType<typeof applicationConfig>;
type Scripts = { dev: string; build: string; setup: string; serve: string };
Expand Down Expand Up @@ -64,11 +64,10 @@ export const applicationConfig = () => {
return self;
},
commit: async (opts?: { stableHash?: string }) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { stableHash } = opts || {};
logger.info(`Creating project "${name}"`);

const appDirName = `${name}__123`;
const appDirName = stableHash || `${name}__${Date.now()}__${hash()}`;
const appDirPath = path.resolve(constants.TMP_DIR, appDirName);

// Copy template files
Expand Down
2 changes: 1 addition & 1 deletion integration/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const common: PlaywrightTestConfig = {
timeout: 90000,
maxFailures: process.env.CI ? 1 : undefined,
workers: process.env.CI ? numAvailableWorkers : '70%',
reporter: 'line',
reporter: process.env.CI ? 'line' : 'list',
use: {
trace: 'on-first-retry',
bypassCSP: true, // We probably need to limit this to specific tests
Expand Down
2 changes: 1 addition & 1 deletion integration/presets/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const nextAppRouter = applicationConfig()
.setName('elements-next')
.useTemplate(templates['elements-next'])
.setEnvFormatter('public', key => `NEXT_PUBLIC_${key}`)
.addScript('setup', 'npm i --verbose')
.addScript('setup', 'npm i')
.addScript('dev', 'npm run dev')
.addScript('build', 'npm run build')
.addScript('serve', 'npm run start')
Expand Down
1 change: 0 additions & 1 deletion integration/tests/elements/otp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('OTP @elem
test.beforeEach(async ({ page, context }) => {
const u = createTestUtils({ app, page, context });
await u.page.goToRelative('/otp');
await u.page.waitForClerkJsLoaded();
});

const otpTypes = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"test": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}",
"test:cache:clear": "FORCE_COLOR=1 turbo test:cache:clear --continue --concurrency=${TURBO_CONCURRENCY:-80%}",
"test:integration:ap-flows": "npm run test:integration:base -- --grep @ap-flows",
"test:integration:base": "DEBUG=1 npx playwright test --config integration/playwright.config.ts --trace=retain-on-failure",
"test:integration:base": "DEBUG=1 npx playwright test --config integration/playwright.config.ts",
"test:integration:cleanup": "DEBUG=1 npx playwright test --config integration/playwright.cleanup.config.ts",
"test:integration:deployment:nextjs": "DEBUG=1 npx playwright test --config integration/playwright.deployments.config.ts",
"test:integration:elements": "E2E_APP_ID=elements.* npm run test:integration:base -- --grep @elements",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-custom/github-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
parser: 'any-eslint-parser',
rules: {
'regex/invalid': [
'warn',
'error',
[
{
regex: '^(?!.*\\$TURBO_ARGS( |$)).*turbo \\S+',
Expand Down

0 comments on commit ab29eff

Please sign in to comment.