Skip to content

Commit

Permalink
Merge branch 'trunk' into try/display-modified-date-conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan committed Mar 6, 2023
2 parents 6a4fc3a + 637bbcd commit 5de7629
Show file tree
Hide file tree
Showing 1,196 changed files with 30,627 additions and 21,780 deletions.
17 changes: 16 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const restrictedImports = [
'mapKeys',
'maxBy',
'memoize',
'merge',
'negate',
'noop',
'nth',
Expand Down Expand Up @@ -388,10 +389,21 @@ module.exports = {
'test/e2e/**/*.[tj]s',
'packages/e2e-test-utils-playwright/**/*.[tj]s',
],
extends: [ 'plugin:eslint-plugin-playwright/playwright-test' ],
extends: [
'plugin:eslint-plugin-playwright/playwright-test',
'plugin:@typescript-eslint/base',
],
parserOptions: {
tsconfigRootDir: __dirname,
project: [
'./test/e2e/tsconfig.json',
'./packages/e2e-test-utils-playwright/tsconfig.json',
],
},
rules: {
'@wordpress/no-global-active-element': 'off',
'@wordpress/no-global-get-selection': 'off',
'playwright/no-page-pause': 'error',
'no-restricted-syntax': [
'error',
{
Expand All @@ -410,6 +422,9 @@ module.exports = {
message: 'Prefer page.locator instead.',
},
],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
},
},
{
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@
/packages/plugins @gziolo @adamsilverstein

# Rich Text
/packages/format-library @ellatrix @fluiddot
/packages/rich-text @ellatrix @fluiddot
/packages/block-editor/src/components/rich-text @ellatrix @fluiddot
/packages/format-library @ellatrix @fluiddot @dcalhoun
/packages/rich-text @ellatrix @fluiddot @dcalhoun
/packages/block-editor/src/components/rich-text @ellatrix @fluiddot @dcalhoun

# Project Management
/.github
Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ on:
types: [published]
push:
branches: [trunk]
workflow_dispatch:
inputs:
branches:
description: 'branches or commits to compare (comma separated)'
required: true
wpversion:
description: 'The base WP version to use for the tests (latest or 6.0, 6.1...)'
required: false
default: 'latest'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand Down Expand Up @@ -44,6 +53,13 @@ jobs:
if: github.event_name == 'pull_request'
run: ./bin/plugin/cli.js perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA

- name: Store performance measurements
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
with:
name: perf-test-results
path: ./__test-results/*.json

- name: Compare performance with current WordPress Core and previous Gutenberg versions
if: github.event_name == 'release'
env:
Expand All @@ -70,7 +86,16 @@ jobs:
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
./bin/plugin/cli.js perf $GITHUB_SHA debd225d007f4e441ceec80fbd6fa96653f94737 --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
- uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
- name: Compare performance with custom branches
if: github.event_name == 'workflow_dispatch'
env:
BRANCHES: ${{ github.event.inputs.branches }}
WP_VERSION: ${{ github.event.inputs.wpversion }}
run: |
./bin/plugin/cli.js perf $(echo $BRANCHES | tr ',' ' ') --tests-branch $GITHUB_SHA --wp-version "$WP_VERSION"
- name: Get commit timestamp
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
if: github.event_name == 'push'
id: commit-timestamp
with:
Expand All @@ -85,3 +110,11 @@ jobs:
COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }}
CODEHEALTH_PROJECT_TOKEN: ${{ secrets.CODEHEALTH_PROJECT_TOKEN }}
run: ./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA debd225d007f4e441ceec80fbd6fa96653f94737 $COMMITTED_AT

- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: always()
with:
name: failures-artifacts
path: ./__test-results/artifacts
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
node-version: ${{ matrix.node }}

- name: Cache NPM packages
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
matrix:
native-test-name: [gutenberg-editor-initial-html]
native-test-name: [gutenberg-editor-rendering]
api-level: [29]

steps:
- name: checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Use desired version of Java
uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3.9.0
uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 # v3.10.0
with:
distribution: 'temurin'
java-version: '11'
Expand All @@ -43,7 +43,7 @@ jobs:
uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3

- name: AVD cache
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
id: avd-cache
with:
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
xcode: ['13.2.1']
device: ['iPhone 13']
native-test-name: [gutenberg-editor-initial-html]
native-test-name: [gutenberg-editor-rendering]

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
Expand All @@ -37,15 +37,15 @@ jobs:
run: find package-lock.json packages/react-native-editor/ios packages/react-native-aztec/ios packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt

- name: Restore build cache
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
with:
path: |
packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app
packages/react-native-editor/ios/build/WDA
key: ${{ runner.os }}-ios-build-${{ matrix.xcode }}-${{ matrix.device }}-${{ hashFiles('ios-checksums.txt') }}

- name: Restore pods cache
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
with:
path: |
packages/react-native-editor/ios/Pods
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT

- name: Cache PHPCS scan cache
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.0.11
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.0.11
with:
path: .cache/phpcs.json
key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ phpunit-watcher.yml
.tool-versions
test/storybook-playwright/test-results
test/storybook-playwright/specs/__snapshots__
test/storybook-playwright/specs/*-snapshots/**
2 changes: 1 addition & 1 deletion bin/cherry-pick.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import readline from 'readline';

import { spawnSync } from 'node:child_process';

const LABEL = process.argv[ 2 ] || 'Backport to WP Minor Release';
const LABEL = process.argv[ 2 ] || 'Backport to WP Beta/RC';
const BRANCH = getCurrentBranch();
const GITHUB_CLI_AVAILABLE = spawnSync( 'gh', [ 'auth', 'status' ] )
?.stderr?.toString()
Expand Down
Loading

0 comments on commit 5de7629

Please sign in to comment.