diff --git a/.github/workflows/TEST_E2E.yml b/.github/workflows/TEST_E2E.yml index 53677aed..75da5ced 100644 --- a/.github/workflows/TEST_E2E.yml +++ b/.github/workflows/TEST_E2E.yml @@ -35,18 +35,18 @@ jobs: run: pnpm i; pnpm playwright install --with-deps - name: ⚗️ Run E2E Tests for Affected Projects - run: pnpm nx affected -t test --base=origin/main --head=HEAD --reporter=html --verbose + run: pnpm nx affected -t e2e --base=origin/main --head=HEAD --reporter=html --verbose # - name: 💀 Run Docs E2E Tests # run: pnpm nx run docs-e2e:e2e --reporter=html --verbose - # - name: 📄 Upload Docs E2E Playwright Report - # uses: actions/upload-artifact@v4 - # if: always() - # with: - # name: playwright-report-docs-e2e - # path: playwright-report/**/* - # retention-days: 30 + - name: 📄 Upload Docs E2E Playwright Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report-docs-e2e + path: playwright-report/**/* + retention-days: 30 # - name: 💀 Run Portal E2E Tests # env: @@ -56,24 +56,24 @@ jobs: # GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} # run: pnpm nx run portal-e2e:e2e --reporter=html --verbose - # - name: 📄 Upload Portal E2E Playwright Report - # uses: actions/upload-artifact@v4 - # if: always() - # with: - # name: playwright-report-portal-e2e - # path: playwright-report/**/* - # retention-days: 30 + - name: 📄 Upload Portal E2E Playwright Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report-portal-e2e + path: playwright-report/**/* + retention-days: 30 # - name: 💀 Run Website E2E Tests # run: pnpm nx run website-e2e:e2e --reporter=html --verbose - # - name: 📄 Upload Website E2E Playwright Report - # uses: actions/upload-artifact@v4 - # if: always() - # with: - # name: playwright-report-website-e2e - # path: playwright-report/**/* - # retention-days: 30 + - name: 📄 Upload Website E2E Playwright Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report-website-e2e + path: playwright-report/**/* + retention-days: 30 - name: 💰 Profit run: echo 🐞 diff --git a/apps/docs-e2e/playwright.config.ts b/apps/docs-e2e/playwright.config.ts index 54006453..23f97f89 100644 --- a/apps/docs-e2e/playwright.config.ts +++ b/apps/docs-e2e/playwright.config.ts @@ -23,6 +23,8 @@ const baseURL = process.env.BASE_URL || 'http://127.0.0.1:3000' export default defineConfig({ ...nxE2EPreset(__filename, { testDir: './src' }), fullyParallel: true, + // Opt out of parallel tests on CI. + workers: process.env.CI ? 1 : undefined, /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ retries: 2, use: { diff --git a/apps/docs-e2e/project.json b/apps/docs-e2e/project.json index 41496a72..0ea9208a 100644 --- a/apps/docs-e2e/project.json +++ b/apps/docs-e2e/project.json @@ -3,6 +3,7 @@ "$schema": "../../node_modules/nx/schemas/project-schema.json", "sourceRoot": "apps/docs-e2e/src", "tags": [], + "implicitDependencies": ["docs"], "// targets": "to see all targets run: nx show project docs-e2e --web", "targets": {} } diff --git a/apps/website-e2e/playwright.config.ts b/apps/website-e2e/playwright.config.ts index fb56377e..9ceb4cb4 100644 --- a/apps/website-e2e/playwright.config.ts +++ b/apps/website-e2e/playwright.config.ts @@ -22,6 +22,8 @@ const baseURL = process.env.BASE_URL || 'http://localhost:3000' export default defineConfig({ ...nxE2EPreset(__filename, { testDir: './src' }), fullyParallel: true, + // Opt out of parallel tests on CI. + workers: process.env.CI ? 1 : undefined, /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { baseURL, diff --git a/apps/website-e2e/project.json b/apps/website-e2e/project.json index 8c764f0f..fac21cd9 100644 --- a/apps/website-e2e/project.json +++ b/apps/website-e2e/project.json @@ -1,7 +1,6 @@ { "name": "website-e2e", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", "sourceRoot": "apps/website-e2e/src", "tags": [], "implicitDependencies": ["website"],