|
6 | 6 | - opened
|
7 | 7 | - reopened
|
8 | 8 | - synchronize
|
| 9 | + - labeled |
9 | 10 | push:
|
10 | 11 | branches:
|
11 | 12 | - main
|
@@ -383,6 +384,142 @@ jobs:
|
383 | 384 | # report-tag: ${{ matrix.suite }}
|
384 | 385 | # job-summary: true
|
385 | 386 |
|
| 387 | + tests-e2e-turbo: |
| 388 | + runs-on: ubuntu-24.04 |
| 389 | + needs: [changes, build] |
| 390 | + if: >- |
| 391 | + needs.changes.outputs.needs_tests == 'true' && |
| 392 | + ( |
| 393 | + contains(github.event.pull_request.labels.*.name, 'run-e2e-turbo') || |
| 394 | + github.event.label.name == 'run-e2e-turbo' |
| 395 | + ) |
| 396 | + name: e2e-turbo-${{ matrix.suite }} |
| 397 | + strategy: |
| 398 | + fail-fast: false |
| 399 | + matrix: |
| 400 | + # find test -type f -name 'e2e.spec.ts' | sort | xargs dirname | xargs -I {} basename {} |
| 401 | + suite: |
| 402 | + - _community |
| 403 | + - access-control |
| 404 | + - admin__e2e__general |
| 405 | + - admin__e2e__list-view |
| 406 | + - admin__e2e__document-view |
| 407 | + - admin-bar |
| 408 | + - admin-root |
| 409 | + - auth |
| 410 | + - auth-basic |
| 411 | + - bulk-edit |
| 412 | + - joins |
| 413 | + - field-error-states |
| 414 | + - fields-relationship |
| 415 | + - fields__collections__Array |
| 416 | + - fields__collections__Blocks |
| 417 | + - fields__collections__Blocks#config.blockreferences.ts |
| 418 | + - fields__collections__Checkbox |
| 419 | + - fields__collections__Collapsible |
| 420 | + - fields__collections__ConditionalLogic |
| 421 | + - fields__collections__CustomID |
| 422 | + - fields__collections__Date |
| 423 | + - fields__collections__Email |
| 424 | + - fields__collections__Indexed |
| 425 | + - fields__collections__JSON |
| 426 | + - fields__collections__Number |
| 427 | + - fields__collections__Point |
| 428 | + - fields__collections__Radio |
| 429 | + - fields__collections__Relationship |
| 430 | + - fields__collections__Row |
| 431 | + - fields__collections__Select |
| 432 | + - fields__collections__Tabs |
| 433 | + - fields__collections__Tabs2 |
| 434 | + - fields__collections__Text |
| 435 | + - fields__collections__UI |
| 436 | + - fields__collections__Upload |
| 437 | + - hooks |
| 438 | + - lexical__collections__Lexical__e2e__main |
| 439 | + - lexical__collections__Lexical__e2e__blocks |
| 440 | + - lexical__collections__Lexical__e2e__blocks#config.blockreferences.ts |
| 441 | + - lexical__collections__RichText |
| 442 | + - query-presets |
| 443 | + - form-state |
| 444 | + - live-preview |
| 445 | + - localization |
| 446 | + - locked-documents |
| 447 | + - i18n |
| 448 | + - plugin-cloud-storage |
| 449 | + - plugin-form-builder |
| 450 | + - plugin-import-export |
| 451 | + - plugin-nested-docs |
| 452 | + - plugin-seo |
| 453 | + - sort |
| 454 | + - versions |
| 455 | + - uploads |
| 456 | + env: |
| 457 | + SUITE_NAME: ${{ matrix.suite }} |
| 458 | + steps: |
| 459 | + - uses: actions/checkout@v4 |
| 460 | + |
| 461 | + - name: Node setup |
| 462 | + uses: ./.github/actions/setup |
| 463 | + with: |
| 464 | + node-version: ${{ env.NODE_VERSION }} |
| 465 | + pnpm-version: ${{ env.PNPM_VERSION }} |
| 466 | + pnpm-run-install: false |
| 467 | + pnpm-restore-cache: false # Full build is restored below |
| 468 | + pnpm-install-cache-key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 469 | + |
| 470 | + - name: Restore build |
| 471 | + uses: actions/cache@v4 |
| 472 | + with: |
| 473 | + path: ./* |
| 474 | + key: ${{ github.sha }}-${{ github.run_number }} |
| 475 | + |
| 476 | + - name: Start LocalStack |
| 477 | + run: pnpm docker:start |
| 478 | + if: ${{ matrix.suite == 'plugin-cloud-storage' }} |
| 479 | + |
| 480 | + - name: Store Playwright's Version |
| 481 | + run: | |
| 482 | + # Extract the version number using a more targeted regex pattern with awk |
| 483 | + PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --depth=0 | awk '/@playwright\/test/ {print $2}') |
| 484 | + echo "Playwright's Version: $PLAYWRIGHT_VERSION" |
| 485 | + echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV |
| 486 | +
|
| 487 | + - name: Cache Playwright Browsers for Playwright's Version |
| 488 | + id: cache-playwright-browsers |
| 489 | + uses: actions/cache@v4 |
| 490 | + with: |
| 491 | + path: ~/.cache/ms-playwright |
| 492 | + key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} |
| 493 | + |
| 494 | + - name: Setup Playwright - Browsers and Dependencies |
| 495 | + if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' |
| 496 | + run: pnpm exec playwright install --with-deps chromium |
| 497 | + |
| 498 | + - name: Setup Playwright - Dependencies-only |
| 499 | + if: steps.cache-playwright-browsers.outputs.cache-hit == 'true' |
| 500 | + run: pnpm exec playwright install-deps chromium |
| 501 | + |
| 502 | + - name: E2E Tests |
| 503 | + run: PLAYWRIGHT_JSON_OUTPUT_NAME=results_${{ matrix.suite }}.json pnpm test:e2e:prod:ci:turbo ${{ matrix.suite }} |
| 504 | + env: |
| 505 | + PLAYWRIGHT_JSON_OUTPUT_NAME: results_${{ matrix.suite }}.json |
| 506 | + NEXT_TELEMETRY_DISABLED: 1 |
| 507 | + |
| 508 | + - uses: actions/upload-artifact@v4 |
| 509 | + if: always() |
| 510 | + with: |
| 511 | + name: test-results-turbo${{ matrix.suite }} |
| 512 | + path: test/test-results/ |
| 513 | + if-no-files-found: ignore |
| 514 | + retention-days: 1 |
| 515 | + |
| 516 | + # Disabled until this is fixed: https://github.com/daun/playwright-report-summary/issues/156 |
| 517 | + # - uses: daun/playwright-report-summary@v3 |
| 518 | + # with: |
| 519 | + # report-file: results_${{ matrix.suite }}.json |
| 520 | + # report-tag: ${{ matrix.suite }} |
| 521 | + # job-summary: true |
| 522 | + |
386 | 523 | # Build listed templates with packed local packages
|
387 | 524 | build-templates:
|
388 | 525 | runs-on: ubuntu-24.04
|
|
0 commit comments