Skip to content

Commit

Permalink
Merge branch 'WordPress:trunk' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakrohillas authored Jun 15, 2024
2 parents 1cf6ece + c756dfe commit 5c8b971
Show file tree
Hide file tree
Showing 119 changed files with 3,341 additions and 2,457 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/reusable-test-core-build-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
required: false
type: 'boolean'
default: true
save-build:
description: 'Whether to save a ZIP of built WordPress as an artifact.'
required: false
type: 'boolean'
default: false
prepare-playground:
description: 'Whether to prepare the artifacts needed for Playground testing.'
required: false
Expand All @@ -47,7 +52,7 @@ jobs:
# - Saves the pull request number to a text file.
# - Uploads the pull request number as an artifact.
build-process-tests:
name: Core running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }}
name: Core running from ${{ inputs.directory }} / ${{ contains( inputs.os, 'macos-' ) && 'MacOS' || contains( inputs.os, 'windows-' ) && 'Windows' || 'Linux' }}
runs-on: ${{ inputs.os }}
timeout-minutes: 20

Expand Down Expand Up @@ -97,14 +102,14 @@ jobs:

- name: Upload ZIP as a GitHub Actions artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: ${{ inputs.prepare-playground }}
if: ${{ inputs.save-build || inputs.prepare-playground }}
with:
name: wordpress-build-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
path: wordpress.zip
if-no-files-found: error

- name: Save PR number
if: ${{ inputs.prepare-playground && github.repository == 'WordPress/wordpress-develop' && github.event_name == 'pull_request' }}
if: ${{ inputs.prepare-playground }}
run: |
mkdir -p ./pr-number
echo ${{ github.event.number }} > ./pr-number/NR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# - Builds Gutenberg.
# - Ensures version-controlled files are not modified or deleted.
build-process-tests:
name: Gutenberg running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }}
name: Gutenberg running from ${{ inputs.directory }} / ${{ contains( inputs.os, 'macos-' ) && 'MacOS' || contains( inputs.os, 'windows-' ) && 'Windows' || 'Linux' }}
runs-on: ${{ inputs.os }}
timeout-minutes: 30

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test-build-processes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ jobs:
# Only prepare artifacts for Playground once.
- os: ubuntu-latest
directory: 'build'
prepare-playground: true
save-build: true
prepare-playground: ${{ github.event_name == 'pull_request' && true || '' }}

with:
os: ${{ matrix.os }}
directory: ${{ matrix.directory }}
save-build: ${{ matrix.save-build && matrix.save-build || false }}
prepare-playground: ${{ matrix.prepare-playground && matrix.prepare-playground || false }}

# Tests the WordPress Core build process on MacOS.
Expand Down
Loading

0 comments on commit 5c8b971

Please sign in to comment.