diff --git a/.github/workflows/label-on-change.yml b/.github/workflows/label-on-change.yml index 74710934b5..1075d46859 100644 --- a/.github/workflows/label-on-change.yml +++ b/.github/workflows/label-on-change.yml @@ -13,7 +13,7 @@ on: jobs: on-labeled-ensure-one-status: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write # Only run on issue labeled and if label starts with 'status:' @@ -49,7 +49,7 @@ jobs: } on-issue-close: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write if: github.event.action == 'closed' @@ -82,7 +82,7 @@ jobs: } on-issue-reopen: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write if: github.event.action == 'reopened' @@ -93,7 +93,7 @@ jobs: labels: 'status: needs-triage' on-issue-assigned: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write if: > @@ -106,11 +106,11 @@ jobs: labels: 'status: needs-triage' # on-pr-merge: - # runs-on: ubuntu-latest + # runs-on: ubuntu-24.04 # if: github.event.pull_request.merged == true # steps: # on-pr-close: - # runs-on: ubuntu-latest + # runs-on: ubuntu-24.04 # if: github.event_name == 'pull_request_target' && github.event.pull_request.merged == false # steps: diff --git a/.github/workflows/lock-issues.yml b/.github/workflows/lock-issues.yml index a03f10918f..05427a307f 100644 --- a/.github/workflows/lock-issues.yml +++ b/.github/workflows/lock-issues.yml @@ -11,7 +11,7 @@ permissions: jobs: lock_issues: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Lock issues uses: dessant/lock-threads@v5 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f6de2c647c..58373dbab1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,13 +2,13 @@ name: build on: pull_request: - types: [ opened, reopened, synchronize ] + types: [opened, reopened, synchronize] push: - branches: [ 'main' ] + branches: ['main'] jobs: changes: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: pull-requests: read outputs: @@ -42,7 +42,7 @@ jobs: core-build: needs: changes if: ${{ needs.changes.outputs.needs_build == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -53,10 +53,10 @@ jobs: - name: tune linux network run: sudo ethtool -K eth0 tx off rx off - - name: Use Node.js 20 + - name: Use Node.js 22.6.0 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.6.0 - name: Install pnpm uses: pnpm/action-setup@v3 @@ -88,7 +88,7 @@ jobs: key: ${{ github.sha }}-${{ github.run_number }} tests: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: core-build strategy: fail-fast: false @@ -108,10 +108,10 @@ jobs: - name: tune linux network run: sudo ethtool -K eth0 tx off rx off - - name: Use Node.js 20 + - name: Use Node.js 22.6.0 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.6.0 - name: Install pnpm uses: pnpm/action-setup@v3 @@ -131,7 +131,7 @@ jobs: - name: Start PostgreSQL uses: CasperWA/postgresql-action@v1.2 with: - postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions + postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions postgresql db: ${{ env.POSTGRES_DB }} postgresql user: ${{ env.POSTGRES_USER }} postgresql password: ${{ env.POSTGRES_PASSWORD }} @@ -181,22 +181,22 @@ jobs: POSTGRES_URL: ${{ env.POSTGRES_URL }} tests-e2e: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: core-build strategy: fail-fast: false matrix: - part: [ 1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8 ] + part: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8] steps: # https://github.com/actions/virtual-environments/issues/1187 - name: tune linux network run: sudo ethtool -K eth0 tx off rx off - - name: Use Node.js 20 + - name: Use Node.js 22.6.0 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.6.0 - name: Install pnpm uses: pnpm/action-setup@v3 @@ -210,6 +210,28 @@ jobs: path: ./* key: ${{ github.sha }}-${{ github.run_number }} + - 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 uses: nick-fields/retry@v2 with: @@ -218,7 +240,7 @@ jobs: timeout_minutes: 15 command: pnpm test:e2e --part ${{ matrix.part }} --bail - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: test-results @@ -226,7 +248,7 @@ jobs: retention-days: 1 tests-type-generation: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: core-build steps: @@ -234,10 +256,10 @@ jobs: - name: tune linux network run: sudo ethtool -K eth0 tx off rx off - - name: Use Node.js 20 + - name: Use Node.js 22.6.0 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.6.0 - name: Install pnpm uses: pnpm/action-setup@v3 @@ -258,7 +280,7 @@ jobs: run: pnpm dev:generate-graphql-schema graphql-schema-gen build-packages: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: core-build strategy: fail-fast: false @@ -278,10 +300,10 @@ jobs: - name: tune linux network run: sudo ethtool -K eth0 tx off rx off - - name: Use Node.js 20 + - name: Use Node.js 22.6.0 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.6.0 - name: Install pnpm uses: pnpm/action-setup@v3 @@ -299,7 +321,7 @@ jobs: run: pnpm turbo run build --filter=${{ matrix.pkg }} plugins: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: core-build strategy: fail-fast: false @@ -319,10 +341,10 @@ jobs: - name: tune linux network run: sudo ethtool -K eth0 tx off rx off - - name: Use Node.js 20 + - name: Use Node.js 22.6.0 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.6.0 - name: Install pnpm uses: pnpm/action-setup@v3 @@ -346,11 +368,11 @@ jobs: templates: needs: changes if: ${{ needs.changes.outputs.templates == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: - template: [ blank, website, ecommerce ] + template: [blank, website, ecommerce] steps: - uses: actions/checkout@v4 @@ -361,10 +383,10 @@ jobs: - name: tune linux network run: sudo ethtool -K eth0 tx off rx off - - name: Use Node.js 20 + - name: Use Node.js 22.6.0 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.6.0 - name: Start MongoDB uses: supercharge/mongodb-github-action@1.10.0 diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 60cf687764..1a4b9a4979 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -8,7 +8,7 @@ on: jobs: post_release: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/release-canary.yml b/.github/workflows/release-canary.yml index d667e9851d..b144014cc1 100644 --- a/.github/workflows/release-canary.yml +++ b/.github/workflows/release-canary.yml @@ -5,7 +5,7 @@ on: jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Echo run: echo "Register release-canary workflow" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b642a38e6c..b7637ed354 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -5,7 +5,7 @@ on: jobs: stale: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write pull-requests: write diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 7b827c9bc1..609736ed04 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -18,7 +18,7 @@ permissions: jobs: debug-context: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: View context attributes uses: actions/github-script@v7 @@ -27,7 +27,7 @@ jobs: label-created-by: name: label-on-open - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Tag with 'created-by' uses: actions/github-script@v7 @@ -89,7 +89,7 @@ jobs: triage: name: initial-triage if: github.event_name == 'issues' - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: diff --git a/package.json b/package.json index e3431cb7ea..8ab18f59e7 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "script:release": "tsx ./scripts/release.ts", "test": "pnpm test:int && pnpm test:components && pnpm test:e2e", "test:components": "cross-env jest --config=jest.components.config.js", - "test:e2e": "npx playwright install --with-deps chromium && ts-node -T ./test/runE2E.ts", + "test:e2e": "ts-node -T ./test/runE2E.ts", "test:e2e:debug": "cross-env PWDEBUG=1 DISABLE_LOGGING=true playwright test", "test:e2e:headed": "cross-env DISABLE_LOGGING=true playwright test --headed", "test:int:postgres": "cross-env PAYLOAD_DATABASE=postgres DISABLE_LOGGING=true jest --forceExit --detectOpenHandles", @@ -38,7 +38,7 @@ "devDependencies": { "@aws-sdk/client-s3": "^3.142.0", "@payloadcms/eslint-config": "workspace:*", - "@playwright/test": "1.40.1", + "@playwright/test": "1.50.0", "@swc/cli": "0.1.65", "@swc/jest": "0.2.29", "@swc/register": "0.1.10", @@ -87,6 +87,7 @@ "mongodb-memory-server": "^9", "node-fetch": "2.6.12", "nodemon": "3.0.3", + "playwright": "1.50.0", "prettier": "^3.0.3", "prompts": "2.4.2", "qs": "6.11.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 742fad7c2d..42cefb817e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: workspace:* version: link:packages/eslint-config-payload '@playwright/test': - specifier: 1.40.1 - version: 1.40.1 + specifier: 1.50.0 + version: 1.50.0 '@swc/cli': specifier: 0.1.65 version: 0.1.65(@swc/core@1.6.1)(chokidar@3.6.0) @@ -185,6 +185,9 @@ importers: nodemon: specifier: 3.0.3 version: 3.0.3 + playwright: + specifier: 1.50.0 + version: 1.50.0 prettier: specifier: ^3.0.3 version: 3.2.5 @@ -2252,9 +2255,11 @@ packages: '@esbuild-kit/core-utils@3.3.2': resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} + deprecated: 'Merged into tsx: https://tsx.is' '@esbuild-kit/esm-loader@2.6.5': resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} + deprecated: 'Merged into tsx: https://tsx.is' '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} @@ -3004,10 +3009,9 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@playwright/test@1.40.1': - resolution: {integrity: sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==} - engines: {node: '>=16'} - deprecated: Please update to the latest version of Playwright to test up-to-date browsers. + '@playwright/test@1.50.0': + resolution: {integrity: sha512-ZGNXbt+d65EGjBORQHuYKj+XhCewlwpnSd/EDuLPZGSiEWmgOJB5RmMCCYGy5aMfTs9wx61RivfDKi8H/hcMvw==} + engines: {node: '>=18'} hasBin: true '@pnpm/config.env-replace@1.1.0': @@ -4112,6 +4116,7 @@ packages: acorn-import-assertions@1.9.0: resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} + deprecated: package has been renamed to acorn-import-attributes peerDependencies: acorn: ^8 @@ -5800,6 +5805,7 @@ packages: eslint@8.48.0: resolution: {integrity: sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true esniff@2.0.1: @@ -7369,6 +7375,7 @@ packages: lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. lodash.includes@4.3.0: resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} @@ -8292,14 +8299,14 @@ packages: resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} engines: {node: '>=8'} - playwright-core@1.40.1: - resolution: {integrity: sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==} - engines: {node: '>=16'} + playwright-core@1.50.0: + resolution: {integrity: sha512-CXkSSlr4JaZs2tZHI40DsZUN/NIwgaUPsyLuOAaIZp2CyF2sN5MM5NJsyB188lFSSozFxQ5fPT4qM+f0tH/6wQ==} + engines: {node: '>=18'} hasBin: true - playwright@1.40.1: - resolution: {integrity: sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==} - engines: {node: '>=16'} + playwright@1.50.0: + resolution: {integrity: sha512-+GinGfGTrd2IfX1TA4N2gNmeIksSb+IAe589ZH+FlmpV3MYTx6+buChGIuDLQwrGNCw2lWibqV50fU510N7S+w==} + engines: {node: '>=18'} hasBin: true pluralize@8.0.0: @@ -12712,9 +12719,9 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@playwright/test@1.40.1': + '@playwright/test@1.50.0': dependencies: - playwright: 1.40.1 + playwright: 1.50.0 '@pnpm/config.env-replace@1.1.0': {} @@ -19407,11 +19414,11 @@ snapshots: dependencies: find-up: 3.0.0 - playwright-core@1.40.1: {} + playwright-core@1.50.0: {} - playwright@1.40.1: + playwright@1.50.0: dependencies: - playwright-core: 1.40.1 + playwright-core: 1.50.0 optionalDependencies: fsevents: 2.3.2