Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "file size" column to the media library menu #2362

Open
wants to merge 151 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
8a13109
Branch 5.9
SergeyBiryukov Jan 4, 2022
abb893a
Query: Improve sanitization within `WP_Tax_Query`.
desrosj Jan 6, 2022
73421fa
Query: Improve sanitization within `WP_Meta_Query`.
desrosj Jan 6, 2022
6677fc3
Upgrade/Install: Avoid using `unserialize()` unnecessarily.
desrosj Jan 6, 2022
844676b
Formatting: Correctly encode ASCII characters in post slugs.
desrosj Jan 6, 2022
8c1e547
REST API: Typo correction in a link description object.
audrasjb Jan 8, 2022
436e02e
Help/About: Change the Learn WP link in the about page.
audrasjb Jan 8, 2022
0cde09d
Fix: WordPress default presets aren't loaded for all themes.
jorgefilipecosta Jan 10, 2022
2aaf564
Fix: Update some default presets in use by default themes to the new …
jorgefilipecosta Jan 10, 2022
6db9175
Update packages to include these bug fixes from Gutenberg:
noisysocks Jan 11, 2022
848f055
Twenty Twenty-Two: Sync updates from GitHub for RC 2.
desrosj Jan 11, 2022
749ebbb
Editor: Fix enqueueing additional styles in wp_enqueue_block_style() …
hellofromtonya Jan 11, 2022
ce45d70
Script Loader: Fix a variable typo in `wp_enqueue_block_style`.
dream-encode Jan 11, 2022
4414a36
Site Editor: Fix typo in home template translatable description.
hellofromtonya Jan 11, 2022
cc838a9
Administration: Update design of the Dashboard welcome panel.
ryelle Jan 11, 2022
36c8f31
Help/About: Update the About section for 5.9.
ryelle Jan 11, 2022
1e2282f
WordPress 5.9 RC2.
SergeyBiryukov Jan 11, 2022
0f2ce5b
Post WordPress 5.9 RC2 version bump.
SergeyBiryukov Jan 11, 2022
471a63d
Media: Add a missing `/` in post thumbnail lazy loading regex.
audrasjb Jan 14, 2022
2fd10c8
Twenty Twenty-Two: Sync updates from GitHub from RC3.
audrasjb Jan 17, 2022
3a1df5b
Administration: Revert [51946].
hellofromtonya Jan 17, 2022
e23f6d9
Editor: Explicitly load remote block patterns in the block and site e…
hellofromtonya Jan 17, 2022
ce2a936
Update @wordpress packages
noisysocks Jan 18, 2022
1f1a0a5
Editor: @wordpress package updates.
hellofromtonya Jan 18, 2022
6c54fa8
WordPress 5.9 RC3.
SergeyBiryukov Jan 18, 2022
e0f857a
Post WordPress 5.9 RC3 version bump.
SergeyBiryukov Jan 18, 2022
425cffc
Twenty Twenty-Two: update the required version.
desrosj Jan 21, 2022
b5ed49d
Bundled Themes: Reverts [52549].
desrosj Jan 21, 2022
eca356b
Tests: Temporarily add expected exceptions to a few theme tests.
desrosj Jan 21, 2022
ba31305
Bundled Themes: Bump the versions for bundled themes for release.
desrosj Jan 22, 2022
0b1eb91
Customizer: Remove Menus panel when a theme does not support menus
noisysocks Jan 24, 2022
f3c2c39
Update @wordpress packages
noisysocks Jan 24, 2022
08aa0b7
Help/About: Update Freedoms page for 5.9.
peterwilsoncc Jan 24, 2022
b91bc36
Plugins/Themes: Allow to install/activate plugins/themes which requir…
ocean90 Jan 24, 2022
693e0b0
Tests: Revert [52617].
ocean90 Jan 24, 2022
7fe1460
Docs: Docblock corrections for `get_block_file_template()`.
audrasjb Jan 24, 2022
acc1a8a
Editor: Bump editor packages to include the latest fixes.
desrosj Jan 24, 2022
cce7fa7
WordPress 5.9 RC4.
SergeyBiryukov Jan 24, 2022
ff8f975
Post WordPress 5.9 RC4 version bump.
SergeyBiryukov Jan 24, 2022
3374dd7
Upgrade/Install: Update `$_old_files` for 5.9.
SergeyBiryukov Jan 24, 2022
c97dfae
WordPress 5.9.
SergeyBiryukov Jan 25, 2022
7c346cf
Post WordPress 5.9 version bump.
SergeyBiryukov Jan 25, 2022
dd1c0af
Upgrade: Prevent warnings upgrading cron array.
peterwilsoncc Feb 2, 2022
f8ce6e2
External libraries: Update jQuery UI to 1.13.1
peterwilsoncc Feb 3, 2022
6ecf6ee
Twenty Twenty-Two: Make 404 pattern search label and button translata…
peterwilsoncc Feb 3, 2022
871afd0
Twenty Twenty-Two: Replace GitHub with .org link in Theme URI.
peterwilsoncc Feb 3, 2022
a5c5997
Themes: Fix for Classic themes using default presets.
SergeyBiryukov Feb 4, 2022
f0180f5
Tests: Rename the test file and class for `wp_get_global_stylesheet()…
SergeyBiryukov Feb 5, 2022
5b2cd50
Twenty Twenty-Two: Remove negative side margins on group blocks with …
audrasjb Feb 7, 2022
513b728
Twenty Twenty-Two: Update mergeinfo after [52688].
SergeyBiryukov Feb 11, 2022
a091ce2
Twenty Twenty-Two: Optimize the `assets/images/ducks.jpg` image.
SergeyBiryukov Feb 11, 2022
64ccc06
Twenty Twenty-Two: Fix headings consistency in Pricing table pattern.
SergeyBiryukov Feb 11, 2022
f86f3d6
Editor: Remove standard post type UI for templates and template parts.
audrasjb Feb 11, 2022
0f34336
Upgrade/Install: Make sure the "Show hidden updates" button is visibl…
SergeyBiryukov Feb 11, 2022
cdf0661
Script Loader: Prevent normalizing HTML IDs in `_wp_normalize_relativ…
audrasjb Feb 11, 2022
5a7a70a
Script Loader: Prevent normalizing HTML IDs in `_wp_normalize_relativ…
audrasjb Feb 11, 2022
46aa382
Query: Check if the theme supports `block-templates` before calling `…
audrasjb Feb 12, 2022
0afadd5
Update mergeinfo for the 5.9 branch.
SergeyBiryukov Feb 12, 2022
b9a082e
Twenty Fifteen: Add gradient background options using the theme color…
audrasjb Feb 13, 2022
33244d0
Revert [52722].
audrasjb Feb 13, 2022
93ece82
Twenty Twenty-One: Allow editor styles to control block margins.
audrasjb Feb 14, 2022
3075d02
Editor: Only render term update notices on term screens.
peterwilsoncc Feb 15, 2022
efe5e46
External libraries: Update version string for hoverIntent.
peterwilsoncc Feb 15, 2022
e417119
Widgets: Missing markup from Widgets Group block.
audrasjb Feb 15, 2022
eb88321
Administration: Fix a CSS issue on the Welcome Panel when the "Dashbo…
audrasjb Feb 15, 2022
b0eed4d
Script Loader: Load block themes styles in the head section.
audrasjb Feb 16, 2022
9a7e624
Editor: Prevent front-end assets of a block from being enqueued in th…
ocean90 Feb 17, 2022
00452c7
Themes: Allow extending `WP_Theme_JSON` and `WP_Theme_JSON_Resolver` …
audrasjb Feb 17, 2022
70213b9
Script Loader: Load block support styles in the head for block themes.
jorgefilipecosta Feb 17, 2022
1c560a4
Script Loader: Improvements to the load block support styles mechanism.
jorgefilipecosta Feb 17, 2022
349bc33
Global Styles: Fix PHP warning in WP_REST_Global_Styles_Controller if…
jorgefilipecosta Feb 17, 2022
cbf7219
Global Styles: Load the global styles before the theme styles in the …
jorgefilipecosta Feb 17, 2022
aa65a85
Editor: Grant only admins access to the "Navigation Menus" UI for blo…
hellofromtonya Feb 17, 2022
37849d4
Docs: Typo corrections in `class-wp-theme-json` docblocks.
audrasjb Feb 17, 2022
4bdde1f
Editor: Backport Duotone fixes for 5.9.1.
audrasjb Feb 17, 2022
4a30e29
Filesystem API: Use a temp folder for `Content-Disposition` files.
SergeyBiryukov Feb 17, 2022
2f1ca79
Script Loader: Prevent normalizing data URIs in `_wp_normalize_relati…
hellofromtonya Feb 17, 2022
7a40118
Editor: Adds an additional check to guard against incompete presets.
hellofromtonya Feb 17, 2022
632b4c9
Editor: Update block editor packages for WordPress 5.9.1.
audrasjb Feb 17, 2022
de80656
Options: Disable transients while installing.
hellofromtonya Feb 17, 2022
4c52266
Editor: Automatically apply global styles duotone filters to render i…
hellofromtonya Feb 17, 2022
f3c1894
WordPress 5.9.1 RC1.
audrasjb Feb 17, 2022
bc9067b
Post WordPress 5.9.1 RC1 version bump.
audrasjb Feb 17, 2022
fd74b1f
Twenty Twenty-Two: Bump theme version to 1.1.
audrasjb Feb 21, 2022
d6e0fa7
Help/About: Update the About page for WordPress 5.9.1.
audrasjb Feb 22, 2022
35cd881
WordPress 5.9.1.
audrasjb Feb 22, 2022
67d7e50
Post WordPress 5.9.1 version bump.
SergeyBiryukov Feb 22, 2022
8cc9e53
Themes: Remove the Live Preview link when installing a block theme fr…
audrasjb Feb 26, 2022
0709236
External Librairies: Update jQuery.query to version 2.2.3.
audrasjb Mar 10, 2022
1b34d90
WordPress 5.9.2.
audrasjb Mar 10, 2022
c78c876
Update WordPress packages.
jorgefilipecosta Mar 10, 2022
27d3af8
Block Editor: Improve Global Styles filtering order.
jorgefilipecosta Mar 10, 2022
0b800e2
Post WordPress 5.9.2 version bump.
SergeyBiryukov Mar 11, 2022
1f2b9ce
Editor: Optimize preload paths for post and site editors.
audrasjb Mar 28, 2022
e258cac
Media: Make `get_post_galleries()` only return galleries.
audrasjb Mar 28, 2022
5963fa5
Themes: Hide block themes live preview link following installation.
audrasjb Mar 29, 2022
930b56b
Themes: Avoid undefined variable warning on `get_svg_filters()`.
audrasjb Mar 29, 2022
f4837d7
Editor: Use `wp_unique_id()` instead of `uniqid()` to generate CSS cl…
audrasjb Mar 29, 2022
99e04b1
Editor: Change location of block support styles in `wp_head`.
audrasjb Mar 29, 2022
8cbd8c0
Editor: Fix broken asset URLs when using WP outside of the regular di…
audrasjb Mar 29, 2022
aae0805
Administration: Do not specify menu order for the Widgets menu when t…
audrasjb Mar 29, 2022
7a6a2ec
Filesystem API: Include the `ssh-ed25519` public key signature algori…
audrasjb Mar 29, 2022
1a569f3
Customizer: When a block theme is active, add an information about Si…
audrasjb Mar 29, 2022
beb96fe
Update WordPress packages for 5.9.3.
audrasjb Mar 30, 2022
8b3d9f3
WordPress 5.9.3 RC1.
audrasjb Mar 30, 2022
e0b75a4
Post WordPress 5.9.3 RC1 version bump.
audrasjb Mar 30, 2022
5c3ae7e
Help/About: Update the About page for WordPress 5.9.3.
audrasjb Apr 5, 2022
7812f57
Help/About: Update the About page with the correct number of bugfixes…
audrasjb Apr 5, 2022
8008f01
WordPress 5.9.3.
audrasjb Apr 5, 2022
0ea7a38
Post WordPress 5.9.3 version bump.
SergeyBiryukov Apr 5, 2022
ea2e02a
Security: Add 5.9 to the list of versions receiving security updates.
SergeyBiryukov May 3, 2022
e1b417f
Build/Test Tools: Pass GitHub Actions environment variables to the Do…
SergeyBiryukov May 4, 2022
3345113
Build/Test Tools: Update 3rd party GitHub Actions.
desrosj Jun 30, 2022
6bcc644
Block Patterns: Update the value used for keywords.
SergeyBiryukov Jul 6, 2022
969da70
Grouped backports to the 5.9 branch.
SergeyBiryukov Aug 30, 2022
63d0b8e
WordPress 5.9.4.
desrosj Aug 30, 2022
560efbf
Security: Introduce strings to indicate support status.
peterwilsoncc Oct 10, 2022
7c29fcf
Tests: Replace the timezone used in date/time tests.
peterwilsoncc Oct 14, 2022
6d9162d
Grouped backports to the 5.9 branch.
audrasjb Oct 17, 2022
5a1c18b
Partial revert of [54545].
desrosj Oct 17, 2022
67cf588
Editor: Bump `@wordpress` packages for 5.9.5.
desrosj Oct 17, 2022
6a86cc3
WordPress 5.9.5.
audrasjb Oct 17, 2022
652f890
Docs: Add missing default parameter value in `themes_api()` docblock.
audrasjb Oct 20, 2022
20012ba
Docs: Add missing default parameter value in `trackback_response()` d…
audrasjb Oct 20, 2022
007118d
Revert accidental 5.9 branch commits [54655] and [54656]
aaronjorbin Oct 20, 2022
94d0172
Media: Add `object-fit` to the allowed list of CSS properties.
peterwilsoncc Nov 8, 2022
c010079
Built/Test tools, HTTP API: Refactor test for multiple location headers.
peterwilsoncc Dec 15, 2022
88b0e2f
I18N: Add new strings to `about.php` for use with end-of-life updates.
peterwilsoncc Feb 21, 2023
5c9b321
Tests: Adjust the expected mime type for WOFF fonts on PHP 8.1.12+.
SergeyBiryukov Mar 9, 2023
2b10ea0
Build/Test Tools: Backport updates to GitHub Actions.
desrosj Mar 10, 2023
1374e4b
General: Update SVN `mergeinfo`.
desrosj Mar 10, 2023
65eaadf
Grouped backports to the 5.9 branch.
audrasjb May 16, 2023
73de8ad
Editor: Restore shortcode support for block templates.
desrosj May 20, 2023
e5dd3fa
WordPress 5.9.7.
desrosj May 20, 2023
b1a15b7
Grouped backports to the 5.9 branch.
joemcgill Oct 12, 2023
eab56ab
WordPress 5.9.8.
audrasjb Oct 12, 2023
2fac376
Build/Test Tools: Change the default value of `LOCAL_PHP`.
desrosj Dec 18, 2023
4c803fb
Grouped Backports to the 5.9 branch
aaronjorbin Jan 30, 2024
99296aa
WordPress 5.9.9.
joemcgill Jan 30, 2024
8a6b7e2
General: Ensure newline at end of file.
desrosj Jan 30, 2024
413abc5
Tests: Use an image on WordPress.org CDN in external HTTP tests.
SergeyBiryukov Apr 15, 2024
820eff1
Build/Test Tools: Make use of new reusable workflows for 5.9.
desrosj Jun 6, 2024
bf285e8
Build/Test Tools: Update `actions/github-scripts` in the 5.9 branch.
desrosj Jun 6, 2024
81d6e9e
Grouped Backports to the 5.9 branch.
audrasjb Jun 24, 2024
0550d4a
WordPress 5.9.10.
audrasjb Jun 24, 2024
3cc726a
Build/Test Tools: Fix local environment whith `memcached`.
desrosj Jun 28, 2024
144beeb
Build/Test Tools: Update the reusable PHPUnit workflow name.
desrosj Jul 3, 2024
035d180
Build/Test Tools: Change 5.9 default values of `LOCAL_PHP`/`LOCAL_DB_…
desrosj Jul 3, 2024
a470aa4
Build/Test Tools: Re-add Slack notices for E2E workflow.
desrosj Jul 23, 2024
a26e0cc
Tests: Use better domain for HTTP API invalid hostname test.
peterwilsoncc Oct 27, 2024
d9c5577
Build/Test Tools: Disable AppArmor for JavaScript testing.
desrosj Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LOCAL_PORT=8889
LOCAL_DIR=src

# The PHP version to use. Valid options are 'latest', and '{version}-fpm'.
LOCAL_PHP=latest
LOCAL_PHP=8.1-fpm

# Whether or not to enable XDebug.
LOCAL_PHP_XDEBUG=false
Expand Down
165 changes: 52 additions & 113 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ on:
- '3.[89]'
- '[4-9].[0-9]'
tags:
- '3.[89]*'
- '[4-9].[0-9]*'
- '[0-9]+.[0-9]'
- '[0-9]+.[0-9].[0-9]+'
- '!3.7.[0-9]+'
pull_request:
branches:
- trunk
Expand All @@ -20,7 +21,7 @@ on:
# Any change to a PHP or JavaScript file should run checks.
- '**.js'
- '**.php'
# These files configure NPM. Changes could affect the outcome.
# These files configure npm. Changes could affect the outcome.
- 'package*.json'
# These files configure Composer. Changes could affect the outcome.
- 'composer.*'
Expand All @@ -39,130 +40,35 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
permissions: {}

jobs:
# Runs PHP coding standards checks.
#
# Violations are reported inline with annotations.
#
# Performs the following steps:
# - Checks out the repository.
# - Sets up PHP.
# - Logs debug information.
# - Configures caching for PHPCS scans.
# - Installs Composer dependencies (use cache if possible).
# - Make Composer packages available globally.
# - Logs PHP_CodeSniffer debug information.
# - Runs PHPCS on the full codebase with warnings suppressed.
# - Runs PHPCS on the `tests` directory without warnings suppressed.
# - Ensures version-controlled files are not modified or deleted.
phpcs:
name: PHP coding standards
runs-on: ubuntu-latest
timeout-minutes: 20
uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}

steps:
- name: Checkout repository
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0

- name: Set up PHP
uses: shivammathur/setup-php@ac7d3d7f84d81a029c20ab72d60264bdb7535831 # v2.15.0
with:
php-version: '7.4'
coverage: none
tools: composer, cs2pr

- name: Log debug information
run: |
php --version
composer --version

# This date is used to ensure that the PHPCS cache is cleared at least once every week.
# http://man7.org/linux/man-pages/man1/date.1.html
- name: "Get last Monday's date"
id: get-date
run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"

- name: Cache PHPCS scan cache
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: .cache/phpcs.json
key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}

- name: Install Composer dependencies
uses: ramsey/composer-install@a7320a0581dcd0432930c48a0e7ced67e6ec17e8 # v1.3.0
with:
composer-options: "--no-progress --no-ansi --no-interaction"

- name: Make Composer packages available globally
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH

- name: Log PHPCS debug information
run: phpcs -i

- name: Run PHPCS on all Core files
run: phpcs -q -n --report=checkstyle | cs2pr

- name: Check test suite files for warnings
run: phpcs tests -q --report=checkstyle | cs2pr

- name: Ensure version-controlled files are not modified during the tests
run: git diff --exit-code
with:
php-version: '7.4'

# Runs the JavaScript coding standards checks.
#
# JSHint violations are not currently reported inline with annotations.
#
# Performs the following steps:
# - Checks out the repository.
# - Logs debug information about the runner container.
# - Installs NodeJS 14.
# - Logs updated debug information.
# _ Installs NPM dependencies using install-changed to hash the `package.json` file.
# - Run the WordPress JSHint checks.
# - Ensures version-controlled files are not modified or deleted.
jshint:
name: JavaScript coding standards
runs-on: ubuntu-latest
timeout-minutes: 20
uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}

steps:
- name: Checkout repository
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0

- name: Log debug information
run: |
npm --version
node --version
git --version
svn --version

- name: Install NodeJS
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c # v2.4.1
with:
node-version: 14
cache: npm

- name: Log debug information
run: |
npm --version
node --version

- name: Install Dependencies
run: npm ci

- name: Run JSHint
run: npm run grunt jshint

- name: Ensure version-controlled files are not modified or deleted
run: git diff --exit-code

slack-notifications:
name: Slack Notifications
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
permissions:
actions: read
contents: read
needs: [ phpcs, jshint ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
Expand All @@ -172,3 +78,36 @@ jobs:
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
permissions:
actions: write
needs: [ phpcs, jshint, slack-notifications ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_attempt < 2 &&
(
needs.phpcs.result == 'cancelled' || needs.phpcs.result == 'failure' ||
needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure'
)

steps:
- name: Dispatch workflow run
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
}
});
144 changes: 56 additions & 88 deletions .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: End-to-end Tests

on:
# The end to end test suite was introduced in WordPress 5.3.
# The end-to-end test suite was introduced in WordPress 5.3.
push:
branches:
- trunk
- '5.[3-9]'
- '[6-9].[0-9]'
tags:
- '5.[3-9]*'
- '[6-9].[0-9]*'
- '[0-9]+.[0-9]'
- '[0-9]+.[0-9].[0-9]+'
- '![34].[0-9].[0-9]+'
- '!5.[0-2].[0-9]+'
pull_request:
branches:
- trunk
Expand All @@ -24,107 +26,73 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
permissions: {}

env:
LOCAL_DIR: build

jobs:
# Runs the end-to-end test suite.
#
# Performs the following steps:
# - Set environment variables.
# - Checks out the repository.
# - Logs debug information about the runner container.
# - Installs NodeJS 14.
# _ Installs NPM dependencies using install-changed to hash the `package.json` file.
# - Builds WordPress to run from the `build` directory.
# - Starts the WordPress Docker container.
# - Logs general debug information.
# - Logs the running Docker containers.
# - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
# - Install WordPress within the Docker container.
# - Run the E2E tests.
# - Ensures version-controlled files are not modified or deleted.
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 20
name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}

steps:
- name: Configure environment variables
run: |
echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0

- name: Log debug information
run: |
npm --version
node --version
curl --version
git --version
svn --version
php --version
php -i
locale -a

- name: Install NodeJS
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c # v2.4.1
with:
node-version: 14
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build WordPress
run: npm run build

- name: Start Docker environment
run: |
npm run env:start

- name: General debug information
run: |
npm --version
node --version
curl --version
git --version
svn --version

- name: Log running Docker containers
run: docker ps -a

- name: Docker debug information
run: |
docker -v
docker-compose -v
docker-compose run --rm mysql mysql --version
docker-compose run --rm php php --version
docker-compose run --rm php php -m
docker-compose run --rm php php -i
docker-compose run --rm php locale -a

- name: Install WordPress
run: npm run env:install

- name: Run E2E tests
run: npm run test:e2e

- name: Ensure version-controlled files are not modified or deleted
run: git diff --exit-code
strategy:
fail-fast: false
matrix:
LOCAL_SCRIPT_DEBUG: [ true, false ]
with:
LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
php-version: '8.0'
install-gutenberg: false

slack-notifications:
name: Slack Notifications
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
permissions:
actions: read
contents: read
needs: [ e2e-tests ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }}
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
secrets:
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}

failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
permissions:
actions: write
needs: [ e2e-tests ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_attempt < 2 &&
(
needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
)
steps:
- name: Dispatch workflow run
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
}
});
Loading
Loading