fix(ui): respect admin.dateFormat for list view filters
#26568
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| push: | |
| branches: [main] | |
| concurrency: | |
| # <workflow_name>-<branch_name>-<true || commit_sha if branch is protected> | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_protected && github.sha || ''}} | |
| cancel-in-progress: true | |
| env: | |
| DO_NOT_TRACK: 1 # Disable Turbopack telemetry | |
| NEXT_TELEMETRY_DISABLED: 1 # Disable Next telemetry | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| needs_build: ${{ steps.filter.outputs.needs_build }} | |
| needs_tests: ${{ steps.filter.outputs.needs_tests }} | |
| templates: ${{ steps.filter.outputs.templates }} | |
| steps: | |
| # https://github.com/actions/virtual-environments/issues/1187 | |
| - name: tune linux network | |
| run: sudo ethtool -K eth0 tx off rx off | |
| - uses: actions/checkout@v5 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| needs_build: | |
| - '.github/workflows/main.yml' | |
| - 'packages/**' | |
| - 'test/**' | |
| - 'pnpm-lock.yaml' | |
| - 'package.json' | |
| - 'templates/**' | |
| needs_tests: | |
| - '.github/workflows/main.yml' | |
| - 'packages/**' | |
| - 'test/**' | |
| - 'pnpm-lock.yaml' | |
| - 'package.json' | |
| templates: | |
| - 'templates/**' | |
| - name: Log filter results | |
| run: | | |
| echo "needs_build: ${{ steps.filter.outputs.needs_build }}" | |
| echo "needs_tests: ${{ steps.filter.outputs.needs_tests }}" | |
| echo "templates: ${{ steps.filter.outputs.templates }}" | |
| lint: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| - name: Lint TypeScript/JavaScript | |
| run: pnpm lint -- --quiet | |
| - name: Lint SCSS | |
| run: pnpm run lint:scss | |
| build: | |
| needs: changes | |
| if: needs.changes.outputs.needs_build == 'true' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| - run: pnpm run build:all | |
| env: | |
| DO_NOT_TRACK: 1 # Disable Turbopack telemetry | |
| - name: Cache build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| tests-unit: | |
| runs-on: ubuntu-24.04 | |
| needs: [changes, build] | |
| if: needs.changes.outputs.needs_tests == 'true' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false # Full build is restored below | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Unit Tests | |
| run: pnpm test:unit | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=8096 | |
| tests-types: | |
| runs-on: ubuntu-24.04 | |
| needs: [changes, build] | |
| if: needs.changes.outputs.needs_tests == 'true' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false # Full build is restored below | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Types Tests | |
| run: pnpm test:types --target '>=5.7' | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=8096 | |
| # Generate the integration test matrix from TypeScript config | |
| int-matrix: | |
| name: Setup Int Matrix | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.generate.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| sparse-checkout: | | |
| .github/workflows | |
| .tool-versions | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .tool-versions | |
| - name: Generate matrix | |
| id: generate | |
| run: | | |
| matrix=$(node .github/workflows/int.config.ts) | |
| echo "matrix=$matrix" >> $GITHUB_OUTPUT | |
| tests-int: | |
| runs-on: ubuntu-24.04 | |
| needs: [changes, build, int-matrix] | |
| if: needs.changes.outputs.needs_tests == 'true' | |
| name: int-${{ matrix.database }}${{ matrix.total-shards > 1 && format(' ({0}/{1})', matrix.shard, matrix.total-shards) || '' }} | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.int-matrix.outputs.matrix) }} | |
| env: | |
| AWS_ENDPOINT_URL: http://127.0.0.1:4566 | |
| AWS_ACCESS_KEY_ID: localstack | |
| AWS_SECRET_ACCESS_KEY: localstack | |
| AWS_REGION: us-east-1 | |
| services: | |
| redis: | |
| image: redis:latest | |
| ports: | |
| - 6379:6379 | |
| options: --health-cmd "redis-cli ping" --health-timeout 30s --health-retries 3 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false # Full build is restored below | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Start LocalStack | |
| run: pnpm docker:start | |
| - name: Configure Redis | |
| run: | | |
| echo "REDIS_URL=redis://127.0.0.1:6379" >> $GITHUB_ENV | |
| - name: Start database | |
| id: db | |
| uses: ./.github/actions/start-database | |
| with: | |
| database: ${{ matrix.database }} | |
| - name: Integration Tests | |
| run: pnpm test:int --shard=${{ matrix.shard }}/${{ matrix.total-shards }} | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=8096 | |
| PAYLOAD_DATABASE: ${{ matrix.database }} | |
| POSTGRES_URL: ${{ steps.db.outputs.POSTGRES_URL }} | |
| MONGODB_URL: ${{ steps.db.outputs.MONGODB_URL }} | |
| MONGODB_ATLAS_URL: ${{ steps.db.outputs.MONGODB_ATLAS_URL }} | |
| # Generate the E2E test matrix from TypeScript config | |
| e2e-matrix: | |
| name: Setup E2E Matrix | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.generate.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| sparse-checkout: | | |
| .github/workflows | |
| .tool-versions | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .tool-versions | |
| - name: Generate matrix | |
| id: generate | |
| run: | | |
| matrix=$(node .github/workflows/e2e.config.ts) | |
| echo "matrix=$matrix" >> $GITHUB_OUTPUT | |
| # Prepare prod test environment once, shared by all E2E shards | |
| e2e-prep: | |
| name: E2E Prep | |
| runs-on: ubuntu-24.04 | |
| needs: [changes, build] | |
| if: needs.changes.outputs.needs_tests == 'true' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Prepare prod test environment | |
| run: pnpm prepare-run-test-against-prod:ci | |
| - name: Cache prepared test environment | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: | | |
| test/packed | |
| test/node_modules | |
| test/package.json | |
| test/pnpm-lock.yaml | |
| key: e2e-prep-${{ github.sha }} | |
| tests-e2e: | |
| runs-on: ubuntu-24.04 | |
| needs: [e2e-matrix, e2e-prep] | |
| name: E2E - ${{ matrix.suite }}${{ matrix.total-shards > 1 && format(' ({0}/{1})', matrix.shard, matrix.total-shards) || '' }} | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.e2e-matrix.outputs.matrix) }} | |
| env: | |
| SUITE_NAME: ${{ matrix.suite }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false # Full build is restored below | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Restore prepared test environment | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| test/packed | |
| test/node_modules | |
| test/package.json | |
| test/pnpm-lock.yaml | |
| key: e2e-prep-${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Start LocalStack | |
| run: pnpm docker:start | |
| if: contains(fromJson('["plugin-cloud-storage", "plugin-import-export"]'), matrix.suite) | |
| - name: Start database | |
| id: db | |
| uses: ./.github/actions/start-database | |
| with: | |
| database: mongodb | |
| - name: Store Playwright's Version | |
| run: | | |
| # Extract the version number using a more targeted regex pattern with awk | |
| PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --depth=0 | awk '/@playwright\/test/ {print $2}') | |
| echo "Playwright's Version: $PLAYWRIGHT_VERSION" | |
| echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
| - name: Cache Playwright Browsers for Playwright's Version | |
| id: cache-playwright-browsers | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | |
| - name: Setup Playwright - Browsers and Dependencies | |
| if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | |
| run: pnpm exec playwright install --with-deps chromium --no-shell | |
| - name: Setup Playwright - Dependencies-only | |
| if: steps.cache-playwright-browsers.outputs.cache-hit == 'true' | |
| run: pnpm exec playwright install-deps chromium | |
| - name: E2E Tests | |
| # E2E Test Execution Strategy: | |
| # | |
| # The e2e.config.ts defines each test suite with: { file, shards, parallel? } | |
| # - shards: Number of CI runners to split this suite across | |
| # - parallel: Whether tests within the suite can run concurrently (default: false) | |
| # | |
| # Flags explained: | |
| # - --fully-parallel: Enables test-level sharding (distributes individual tests across shards, | |
| # not just files). There is an arbitrary limitation that disables sharding if fullyParallel | |
| # is not set. | |
| # - --workers=1: Forces serial execution within each shard. Added when parallel=false. | |
| # | |
| # How it works: | |
| # - Most suites: parallel=false → tests run serially (--workers=1) but are sharded across runners | |
| # - Parallel suites (e.g. LexicalFullyFeatured): parallel=true → tests run concurrently within each shard | |
| # | |
| # Local vs CI behavior: | |
| # - Locally: playwright.config.ts has workers=16. Without --fully-parallel, Playwright | |
| # runs tests serially by default (one test at a time per file). Suites with | |
| # test.describe.configure({ mode: 'parallel' }) opt into parallel execution. | |
| # - CI: We must use --fully-parallel to enable test-level sharding across runners. | |
| # However, --fully-parallel would also run all tests in parallel within each shard. | |
| # To maintain serial execution for most suites, we pass --workers=1 when parallel=false. | |
| # Suites with parallel=true (e.g. LexicalFullyFeatured) use the default 16 workers. | |
| # | |
| # Note: The e2e-prep job runs prepare-run-test-against-prod:ci once and caches the result. | |
| # This job restores that cache, so we use test:e2e:prod:run which skips preparation. | |
| run: PLAYWRIGHT_JSON_OUTPUT_NAME=results_${{ matrix.suite }}_${{ matrix.shard }}.json pnpm test:e2e:prod:run:noturbo ${{ matrix.suite }} --shard=${{ matrix.shard }}/${{ matrix.total-shards }} --fully-parallel${{ matrix.parallel == false && ' --workers=1' || '' }} | |
| env: | |
| PLAYWRIGHT_JSON_OUTPUT_NAME: results_${{ matrix.suite }}_${{ matrix.shard }}.json | |
| NEXT_TELEMETRY_DISABLED: 1 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-${{ matrix.suite }}_${{ matrix.shard }} | |
| path: test/test-results/ | |
| if-no-files-found: ignore | |
| retention-days: 1 | |
| # Disabled until this is fixed: https://github.com/daun/playwright-report-summary/issues/156 | |
| # - uses: daun/playwright-report-summary@v3 | |
| # with: | |
| # report-file: results_${{ matrix.suite }}.json | |
| # report-tag: ${{ matrix.suite }} | |
| # job-summary: true | |
| # This is unused, keeping it here for reference and possibly enabling in the future | |
| tests-e2e-turbo: | |
| runs-on: ubuntu-24.04 | |
| needs: [changes, build] | |
| if: >- | |
| needs.changes.outputs.needs_tests == 'true' && | |
| ( | |
| contains(github.event.pull_request.labels.*.name, 'run-e2e-turbo') || | |
| github.event.label.name == 'run-e2e-turbo' | |
| ) | |
| name: e2e-turbo-${{ matrix.suite }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # find test -type f -name 'e2e.spec.ts' | sort | xargs dirname | xargs -I {} basename {} | |
| suite: | |
| - _community | |
| - access-control | |
| - admin__e2e__general | |
| - admin__e2e__list-view | |
| - admin__e2e__document-view | |
| - admin-bar | |
| - admin-root | |
| - auth | |
| - auth-basic | |
| - bulk-edit | |
| - dashboard | |
| - joins | |
| - field-error-states | |
| - fields-relationship | |
| - fields__collections__Array | |
| - fields__collections__Blocks | |
| - fields__collections__Blocks#config.blockreferences.ts | |
| - fields__collections__Checkbox | |
| - fields__collections__Collapsible | |
| - fields__collections__ConditionalLogic | |
| - fields__collections__CustomID | |
| - fields__collections__Date | |
| - fields__collections__Email | |
| - fields__collections__Indexed | |
| - fields__collections__JSON | |
| - fields__collections__Number | |
| - fields__collections__Point | |
| - fields__collections__Radio | |
| - fields__collections__Relationship | |
| - fields__collections__Row | |
| - fields__collections__Select | |
| - fields__collections__Tabs | |
| - fields__collections__Tabs2 | |
| - fields__collections__Text | |
| - fields__collections__UI | |
| - fields__collections__Upload | |
| - group-by | |
| - folders | |
| - hooks | |
| - lexical__collections___LexicalFullyFeatured | |
| - lexical__collections___LexicalFullyFeatured__db | |
| - lexical__collections__LexicalHeadingFeature | |
| - lexical__collections__LexicalJSXConverter | |
| - lexical__collections__LexicalLinkFeature | |
| - lexical__collections__OnDemandForm | |
| - lexical__collections__Lexical__e2e__main | |
| - lexical__collections__Lexical__e2e__blocks | |
| - lexical__collections__Lexical__e2e__blocks#config.blockreferences.ts | |
| - lexical__collections__RichText | |
| - query-presets | |
| - form-state | |
| - live-preview | |
| - localization | |
| - locked-documents | |
| - i18n | |
| - plugin-cloud-storage | |
| - plugin-form-builder | |
| - plugin-import-export | |
| - plugin-multi-tenant | |
| - plugin-nested-docs | |
| - plugin-seo | |
| - queues | |
| - sort | |
| - trash | |
| - versions | |
| - uploads | |
| env: | |
| SUITE_NAME: ${{ matrix.suite }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false # Full build is restored below | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Start LocalStack | |
| run: pnpm docker:start | |
| if: contains(fromJson('["plugin-cloud-storage", "plugin-import-export"]'), matrix.suite) | |
| - name: Store Playwright's Version | |
| run: | | |
| # Extract the version number using a more targeted regex pattern with awk | |
| PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --depth=0 | awk '/@playwright\/test/ {print $2}') | |
| echo "Playwright's Version: $PLAYWRIGHT_VERSION" | |
| echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
| - name: Cache Playwright Browsers for Playwright's Version | |
| id: cache-playwright-browsers | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | |
| - name: Setup Playwright - Browsers and Dependencies | |
| if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Setup Playwright - Dependencies-only | |
| if: steps.cache-playwright-browsers.outputs.cache-hit == 'true' | |
| run: pnpm exec playwright install-deps chromium | |
| - name: E2E Tests | |
| run: PLAYWRIGHT_JSON_OUTPUT_NAME=results_${{ matrix.suite }}.json pnpm test:e2e:prod:ci ${{ matrix.suite }} | |
| env: | |
| PLAYWRIGHT_JSON_OUTPUT_NAME: results_${{ matrix.suite }}.json | |
| NEXT_TELEMETRY_DISABLED: 1 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-turbo${{ matrix.suite }} | |
| path: test/test-results/ | |
| if-no-files-found: ignore | |
| retention-days: 1 | |
| # Disabled until this is fixed: https://github.com/daun/playwright-report-summary/issues/156 | |
| # - uses: daun/playwright-report-summary@v3 | |
| # with: | |
| # report-file: results_${{ matrix.suite }}.json | |
| # report-tag: ${{ matrix.suite }} | |
| # job-summary: true | |
| # Build listed templates with packed local packages and then runs their int and e2e tests | |
| build-and-test-templates: | |
| runs-on: ubuntu-24.04 | |
| needs: [changes, build] | |
| if: needs.changes.outputs.needs_build == 'true' | |
| name: build-template-${{ matrix.template }}-${{ matrix.database }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - template: blank | |
| database: mongodb | |
| - template: website | |
| database: mongodb | |
| - template: with-vercel-mongodb | |
| database: mongodb | |
| # Postgres | |
| - template: with-postgres | |
| database: postgres | |
| - template: with-vercel-postgres | |
| database: postgres | |
| - template: plugin | |
| # Re-enable once PG conncection is figured out | |
| # - template: with-vercel-website | |
| # database: postgres | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false # Full build is restored below | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Start database | |
| id: db | |
| if: matrix.database | |
| uses: ./.github/actions/start-database | |
| with: | |
| database: ${{ matrix.database }} | |
| - name: Build Template | |
| run: | | |
| pnpm run script:pack --dest templates/${{ matrix.template }} | |
| pnpm run script:build-template-with-local-pkgs ${{ matrix.template }} $DB_CONNECTION | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=8096 | |
| DB_CONNECTION: ${{ steps.db.outputs.POSTGRES_URL || steps.db.outputs.MONGODB_URL }} | |
| - name: Store Playwright's Version | |
| run: | | |
| # Extract the version number using a more targeted regex pattern with awk | |
| PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --depth=0 | awk '/@playwright\/test/ {print $2}') | |
| echo "Playwright's Version: $PLAYWRIGHT_VERSION" | |
| echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
| - name: Cache Playwright Browsers for Playwright's Version | |
| id: cache-playwright-browsers | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | |
| - name: Setup Playwright - Browsers and Dependencies | |
| if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Setup Playwright - Dependencies-only | |
| if: steps.cache-playwright-browsers.outputs.cache-hit == 'true' | |
| run: pnpm exec playwright install-deps chromium | |
| - name: Runs Template Int Tests | |
| run: pnpm --filter ${{ matrix.template }} run test:int | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=8096 | |
| PAYLOAD_DATABASE: ${{ matrix.database }} | |
| POSTGRES_URL: ${{ steps.db.outputs.POSTGRES_URL }} | |
| MONGODB_URL: ${{ steps.db.outputs.MONGODB_URL }} | |
| - name: Runs Template E2E Tests | |
| run: PLAYWRIGHT_JSON_OUTPUT_NAME=results_${{ matrix.template }}.json pnpm --filter ${{ matrix.template }} test:e2e | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=8096 | |
| PAYLOAD_DATABASE: ${{ matrix.database }} | |
| POSTGRES_URL: ${{ steps.db.outputs.POSTGRES_URL }} | |
| MONGODB_URL: ${{ steps.db.outputs.MONGODB_URL }} | |
| NEXT_TELEMETRY_DISABLED: 1 | |
| tests-type-generation: | |
| runs-on: ubuntu-24.04 | |
| needs: [changes, build] | |
| if: needs.changes.outputs.needs_tests == 'true' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false # Full build is restored below | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - name: Generate Payload Types | |
| run: pnpm dev:generate-types fields | |
| - name: Generate GraphQL schema file | |
| run: pnpm dev:generate-graphql-schema graphql-schema-gen | |
| all-green: | |
| name: All Green | |
| if: always() | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| [ | |
| lint, | |
| build, | |
| build-and-test-templates, | |
| tests-unit, | |
| tests-int, | |
| tests-e2e, | |
| tests-types, | |
| tests-type-generation, | |
| ] | |
| steps: | |
| - if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }} | |
| run: exit 1 | |
| publish-canary: | |
| name: Publish Canary | |
| runs-on: ubuntu-24.04 | |
| if: ${{ needs.all-green.result == 'success' && github.ref_name == 'main' }} | |
| needs: | |
| - all-green | |
| steps: | |
| # debug github.ref output | |
| - run: | | |
| echo github.ref: ${{ github.ref }} | |
| echo isV3: ${{ github.ref == 'refs/heads/main' }} | |
| analyze: | |
| runs-on: ubuntu-latest | |
| needs: [changes, build] | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read # for checkout repository | |
| actions: read # for fetching base branch bundle stats | |
| pull-requests: write # for comments | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Node setup | |
| uses: ./.github/actions/setup | |
| with: | |
| pnpm-run-install: false | |
| pnpm-restore-cache: false # Full build is restored below | |
| cache-propagation-delay: 120 # https://github.com/actions/cache/issues/1710 | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }} | |
| fail-on-cache-miss: true | |
| - run: pnpm run build:bundle-for-analysis # Esbuild packages that haven't already been built in the build step for the purpose of analyzing bundle size | |
| env: | |
| DO_NOT_TRACK: 1 # Disable Turbopack telemetry | |
| - name: Analyze esbuild bundle size | |
| # Temporarily disable this for community PRs until this can be implemented in a separate workflow | |
| if: github.event.pull_request.head.repo.fork == false | |
| uses: exoego/esbuild-bundle-analyzer@v1 | |
| with: | |
| metafiles: 'packages/payload/meta_index.json,packages/payload/meta_shared.json,packages/ui/meta_client.json,packages/ui/meta_shared.json,packages/next/meta_index.json,packages/richtext-lexical/meta_client.json' |