Skip to content

Commit

Permalink
Merge branch 'trunk' into rnmobile/release_1.109.2
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	packages/react-native-aztec/package.json
#	packages/react-native-bridge/package.json
#	packages/react-native-editor/CHANGELOG.md
#	packages/react-native-editor/ios/Podfile.lock
#	packages/react-native-editor/package.json
  • Loading branch information
fluiddot committed Dec 5, 2023
2 parents b10351b + 6ab61f6 commit 044ef9e
Show file tree
Hide file tree
Showing 769 changed files with 33,659 additions and 21,386 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ concurrency:

jobs:
e2e-puppeteer:
name: Puppeteer - ${{ matrix.part }}
name: Puppeteer
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
part: [1, 2, 3]
totalParts: [3]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -43,8 +40,7 @@ jobs:
- name: Running the tests
run: |
npx wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
npx wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % ${{ matrix.totalParts }} == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests )
npx wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache"
- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
Expand All @@ -69,8 +65,8 @@ jobs:
strategy:
fail-fast: false
matrix:
part: [1, 2, 3, 4]
totalParts: [4]
part: [1, 2, 3, 4, 5, 6, 7, 8]
totalParts: [8]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -92,6 +88,8 @@ jobs:
npm run wp-env start
- name: Run the tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e:playwright -- --shard=${{ matrix.part }}/${{ matrix.totalParts }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ jobs:
- name: Compare performance with base branch
if: github.event_name == 'push'
# The base hash used here need to be a commit that is compatible with the current WP version
# The current one is bd2a881101727b03b0be09382b34841af5a3c03e and it needs to be updated every WP major release.
# The current one is b61dde2e5ec29d98801e623de968bfb286c5be3f and it needs to be updated every WP major release.
# It is used as a base comparison point to avoid fluctuation in the performance metrics.
run: |
WP_VERSION=$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt)
IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION"
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
./bin/plugin/cli.js perf $GITHUB_SHA bd2a881101727b03b0be09382b34841af5a3c03e --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
./bin/plugin/cli.js perf $GITHUB_SHA b61dde2e5ec29d98801e623de968bfb286c5be3f --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
- name: Compare performance with custom branches
if: github.event_name == 'workflow_dispatch'
Expand All @@ -97,7 +97,7 @@ jobs:
CODEHEALTH_PROJECT_TOKEN: ${{ secrets.CODEHEALTH_PROJECT_TOKEN }}
run: |
COMMITTED_AT=$(git show -s $GITHUB_SHA --format="%cI")
./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA bd2a881101727b03b0be09382b34841af5a3c03e $COMMITTED_AT
./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA b61dde2e5ec29d98801e623de968bfb286c5be3f $COMMITTED_AT
- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale-issue-gardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
remove-stale-when-updated: true
stale-issue-label: '[Status] Stale'
- name: 'Flaky test issues without activity'
message: 'This issue has gone 30 days without any activity.'
days-before-stale: 30
message: 'This issue has gone 15 days without any activity.'
days-before-stale: 15
days-before-close: 1
only-labels: '[Type] Flaky Test'
remove-stale-when-updated: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
# dependency versions are installed and cached.
##
- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # v2.27.1
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
with:
php-version: '${{ matrix.php }}'
ini-file: development
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # v2.27.1
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
with:
php-version: '7.4'
coverage: none
Expand Down
41 changes: 33 additions & 8 deletions bin/plugin/commands/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,17 @@ const LABEL_FEATURE_MAPPING = {
'[Feature] Raw Handling': 'Block Editor',
'[Package] Edit Post': 'Post Editor',
'[Package] Icons': 'Icons',
'[Package] Block Editor': 'Block Editor',
'[Package] Block editor': 'Block Editor',
'[Package] Block library': 'Block Library',
'[Package] Editor': 'Post Editor',
'[Package] Edit Site': 'Site Editor',
'[Package] Edit Widgets': 'Widgets Editor',
'[Package] Widgets Customizer': 'Widgets Editor',
'[Package] Components': 'Components',
'[Package] Block Library': 'Block Library',
'[Package] Rich text': 'Block Editor',
'[Package] Data': 'Data Layer',
'[Package] Commands': 'Commands',
'[Block] Legacy Widget': 'Widgets Editor',
'REST API Interaction': 'REST API',
'New Block': 'Block Library',
Expand Down Expand Up @@ -220,9 +222,18 @@ function getTypesByLabels( labels ) {
...new Set(
labels
.filter( ( label ) =>
Object.keys( LABEL_TYPE_MAPPING ).includes( label )
Object.keys( LABEL_TYPE_MAPPING )
.map( ( currentLabel ) => currentLabel.toLowerCase() )
.includes( label.toLowerCase() )
)
.map( ( label ) => LABEL_TYPE_MAPPING[ label ] )
.map( ( label ) => {
const lowerCaseLabel =
Object.keys( LABEL_TYPE_MAPPING ).find(
( key ) => key.toLowerCase() === label.toLowerCase()
) || label;

return LABEL_TYPE_MAPPING[ lowerCaseLabel ];
} )
),
];
}
Expand All @@ -236,11 +247,24 @@ function getTypesByLabels( labels ) {
* @return {string[]} Feature candidates.
*/
function mapLabelsToFeatures( labels ) {
return labels
.filter( ( label ) =>
Object.keys( LABEL_FEATURE_MAPPING ).includes( label )
)
.map( ( label ) => LABEL_FEATURE_MAPPING[ label ] );
return [
...new Set(
labels
.filter( ( label ) =>
Object.keys( LABEL_FEATURE_MAPPING )
.map( ( currentLabel ) => currentLabel.toLowerCase() )
.includes( label.toLowerCase() )
)
.map( ( label ) => {
const lowerCaseLabel =
Object.keys( LABEL_FEATURE_MAPPING ).find(
( key ) => key.toLowerCase() === label.toLowerCase()
) || label;

return LABEL_FEATURE_MAPPING[ lowerCaseLabel ];
} )
),
];
}

/**
Expand Down Expand Up @@ -1070,4 +1094,5 @@ async function getReleaseChangelog( options ) {
getChangelog,
getUniqueByUsername,
skipCreatedByBots,
mapLabelsToFeatures,
};
1 change: 1 addition & 0 deletions bin/plugin/commands/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ async function runTestSuite( testSuite, testRunnerDir, runKey ) {
testRunnerDir,
{
...process.env,
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1',
WP_ARTIFACTS_PATH: ARTIFACTS_PATH,
RESULTS_ID: runKey,
}
Expand Down
Loading

0 comments on commit 044ef9e

Please sign in to comment.