diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4cae4ebb8..2952ef6d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: # This line enables distribution # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" --verbose + - run: pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --verbose - run: pnpm exec playwright install @@ -46,6 +46,5 @@ jobs: with: name: playwright-report path: | - ./dist/.playwright/** - ./dist/** + ./**/.playwright/** retention-days: 30 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e1e93705a..bf27b65cd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,7 +37,7 @@ jobs: # This line enables distribution # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" --verbose + - run: pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --verbose - run: pnpm exec playwright install @@ -55,8 +55,7 @@ jobs: with: name: playwright-report path: | - ./dist/.playwright/** - ./dist/** + ./**/.playwright/** retention-days: 30 - run: git status diff --git a/.nx/workflows/dynamic-changesets.yml b/.nx/workflows/dynamic-changesets.yml index d3536f3ba..ae47c2dd9 100644 --- a/.nx/workflows/dynamic-changesets.yml +++ b/.nx/workflows/dynamic-changesets.yml @@ -1,4 +1,5 @@ distribute-on: - small-changeset: 3 linux-medium-js - medium-changeset: 6 linux-medium-js - large-changeset: 10 linux-medium-js + small-changeset: 3 linux-medium-js # Distribute on small if 1-25% of projects affected in PR + medium-changeset: 6 linux-medium-js # Distribute on medium if 26-50% of projects affected in PR + large-changeset: 10 linux-medium-js # Distribute on large if 51-75% of projects affected in PR + extra-large-changeset: 15 linux-medium-js # Distribute on extra-large if 76-100% of projects affected in PR diff --git a/e2e/autoscript-suites/.eslintignore b/e2e/autoscript-suites/.eslintignore index 7eb3b6427..ddb904672 100644 --- a/e2e/autoscript-suites/.eslintignore +++ b/e2e/autoscript-suites/.eslintignore @@ -6,4 +6,5 @@ LICENSE .bin dist .eslintignore -*.html \ No newline at end of file +*.html +.playwright/ diff --git a/e2e/autoscript-suites/playwright.config.ts b/e2e/autoscript-suites/playwright.config.ts index 8834f9782..d54635050 100644 --- a/e2e/autoscript-suites/playwright.config.ts +++ b/e2e/autoscript-suites/playwright.config.ts @@ -1,5 +1,4 @@ import * as os from 'os'; -import { PlaywrightTestConfig } from '@playwright/test'; import { nxE2EPreset } from '@nx/playwright/preset'; import { workspaceRoot } from '@nx/devkit'; import { fileURLToPath } from 'url'; @@ -13,8 +12,9 @@ const baseConfig = nxE2EPreset(__filename, { testDir: './src/suites', }); -const config: PlaywrightTestConfig = { +const config = { ...baseConfig, + outputDir: './.playwright', reporter: process.env.CI ? 'github' : 'list', testIgnore: '**/authz-txn*', use: { diff --git a/e2e/davinci-suites/.eslintignore b/e2e/davinci-suites/.eslintignore index 7787c22e4..82f30765b 100644 --- a/e2e/davinci-suites/.eslintignore +++ b/e2e/davinci-suites/.eslintignore @@ -1,3 +1,4 @@ +.playwright/ node_modules *.md LICENSE @@ -5,4 +6,4 @@ LICENSE .env* .bin dist -.eslintignore \ No newline at end of file +.eslintignore diff --git a/e2e/davinci-suites/playwright.config.ts b/e2e/davinci-suites/playwright.config.ts index 7437f157b..d6355155b 100644 --- a/e2e/davinci-suites/playwright.config.ts +++ b/e2e/davinci-suites/playwright.config.ts @@ -14,6 +14,7 @@ const baseConfig = nxE2EPreset(__filename, { const config: PlaywrightTestConfig = { ...baseConfig, + outputDir: './.playwright', reporter: process.env.CI ? 'github' : 'list', timeout: 30000, use: { diff --git a/e2e/token-vault-suites/.eslintignore b/e2e/token-vault-suites/.eslintignore index 7787c22e4..ffffb3d75 100644 --- a/e2e/token-vault-suites/.eslintignore +++ b/e2e/token-vault-suites/.eslintignore @@ -5,4 +5,5 @@ LICENSE .env* .bin dist -.eslintignore \ No newline at end of file +.eslintignore +./.playwright diff --git a/e2e/token-vault-suites/playwright.config.ts b/e2e/token-vault-suites/playwright.config.ts index c60fb1315..b9e0a77f6 100644 --- a/e2e/token-vault-suites/playwright.config.ts +++ b/e2e/token-vault-suites/playwright.config.ts @@ -14,6 +14,7 @@ const baseConfig = nxE2EPreset(__filename, { const config: PlaywrightTestConfig = { ...baseConfig, + outputDir: './.playwright', reporter: process.env.CI ? 'github' : 'list', timeout: 30000, use: { diff --git a/nx.json b/nx.json index e6f043f2c..146a6c3f0 100644 --- a/nx.json +++ b/nx.json @@ -29,6 +29,7 @@ "e2e": { "dependsOn": ["^build"], "inputs": ["noMarkdown", "^noMarkdown"], + "outputs": ["{projectRoot}/.playwright"], "cache": true }, "build": { @@ -57,16 +58,19 @@ "@nx/playwright:run": { "dependsOn": ["^build"], "inputs": ["noMarkdown", "^noMarkdown"], + "outputs": ["{projectRoot}/.playwright"], "cache": true }, "@nx/esbuild:esbuild": { "dependsOn": ["^build"], "cache": true, - "inputs": ["noMarkdown", "^noMarkdown"] + "inputs": ["noMarkdown", "^noMarkdown"], + "outputs": ["{projectRoot}/dist"] }, "e2e-ci--**/*": { "dependsOn": ["^build"], "inputs": ["noMarkdown", "^noMarkdown"], + "outputs": ["{projectRoot}/.playwright"], "cache": true }, "@nx/js:tsc": {