Skip to content

Commit e8831ce

Browse files
authored
Merge branch 'trunk' into 54915-rtl-inputs
2 parents 6ad2984 + 9d4f4a9 commit e8831ce

File tree

1,398 files changed

+51073
-18983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,398 files changed

+51073
-18983
lines changed

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// For format details, see https://aka.ms/devcontainer.json.
2+
{
3+
"name": "WordPress Core Development",
4+
"dockerComposeFile": "docker-compose.yml",
5+
"service": "app",
6+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
"features": {
10+
"ghcr.io/devcontainers/features/common-utils:2": {
11+
"username": "wordpress"
12+
},
13+
"ghcr.io/devcontainers/features/node:1": {
14+
"version": "14"
15+
},
16+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
17+
"ghcr.io/devcontainers/features/git:1": {}
18+
},
19+
"onCreateCommand": "sudo chmod +x .devcontainer/install-tools.sh && .devcontainer/install-tools.sh",
20+
"postCreateCommand": "sudo chmod +x .devcontainer/setup.sh && .devcontainer/setup.sh",
21+
"forwardPorts": [
22+
8080
23+
],
24+
"remoteUser": "wordpress"
25+
}

.devcontainer/docker-compose.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: '3.1'
2+
3+
services:
4+
app:
5+
image: wordpress
6+
restart: always
7+
ports:
8+
- 8080:80
9+
environment:
10+
WORDPRESS_DB_HOST: db
11+
WORDPRESS_DB_USER: exampleuser
12+
WORDPRESS_DB_PASSWORD: examplepass
13+
WORDPRESS_DB_NAME: exampledb
14+
volumes:
15+
- ../..:/workspaces:cached
16+
17+
db:
18+
image: mariadb
19+
restart: unless-stopped
20+
environment:
21+
MYSQL_DATABASE: exampledb
22+
MYSQL_USER: exampleuser
23+
MYSQL_PASSWORD: examplepass
24+
MYSQL_RANDOM_ROOT_PASSWORD: '1'
25+
volumes:
26+
- db:/var/lib/mysql
27+
28+
volumes:
29+
db:

.devcontainer/install-tools.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
set -eux
4+
5+
echo "Installing wp-cli..."
6+
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
7+
sudo chmod +x wp-cli.phar
8+
sudo mv wp-cli.phar /usr/local/bin/wp
9+
10+
echo "Installing chromium..."
11+
sudo apt-get update
12+
sudo apt-get -y install --no-install-recommends chromium
13+
14+
# Copy the welcome message
15+
sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt

.devcontainer/setup.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
set -eux
4+
5+
if [ -z ${CODESPACE_NAME+x} ]; then
6+
SITE_HOST="http://localhost:8080"
7+
else
8+
SITE_HOST="https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
9+
fi
10+
11+
# Install dependencies
12+
cd /workspaces/wordpress-develop
13+
npm install && npm run build:dev
14+
15+
# Install WordPress and activate the plugin/theme.
16+
cd /var/www/html
17+
echo "Setting up WordPress at $SITE_HOST"
18+
wp core install --url="$SITE_HOST" --title="WordPress Trunk" --admin_user="admin" --admin_email="[email protected]" --admin_password="password" --skip-email

.devcontainer/welcome-message.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
👋 Welcome to "WordPress Core Development" in Codespaces!
2+
3+
🛠️ Your environment is fully setup with all the required software.
4+
5+
🚀 To get started, wait for the "postCreateCommand" to finish setting things up, then open the portforwarded URL and append '/wp-admin'.
6+

.github/workflows/coding-standards.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ concurrency:
4040
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
4141
cancel-in-progress: true
4242

43+
# Disable permissions for all available scopes by default.
44+
# Any needed permissions should be configured at the job level.
45+
permissions: {}
46+
4347
jobs:
4448
# Runs PHP coding standards checks.
4549
#
@@ -59,6 +63,8 @@ jobs:
5963
phpcs:
6064
name: PHP coding standards
6165
runs-on: ubuntu-latest
66+
permissions:
67+
contents: read
6268
timeout-minutes: 20
6369
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
6470

@@ -67,7 +73,7 @@ jobs:
6773
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
6874

6975
- name: Set up PHP
70-
uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0
76+
uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0
7177
with:
7278
php-version: '7.4'
7379
coverage: none
@@ -80,7 +86,7 @@ jobs:
8086
run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
8187

8288
- name: Cache PHPCS scan cache
83-
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3
89+
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
8490
with:
8591
path: |
8692
.cache/phpcs-src.json
@@ -130,6 +136,8 @@ jobs:
130136
jshint:
131137
name: JavaScript coding standards
132138
runs-on: ubuntu-latest
139+
permissions:
140+
contents: read
133141
timeout-minutes: 20
134142
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
135143
env:
@@ -164,6 +172,9 @@ jobs:
164172
slack-notifications:
165173
name: Slack Notifications
166174
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
175+
permissions:
176+
actions: read
177+
contents: read
167178
needs: [ phpcs, jshint ]
168179
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
169180
with:
@@ -177,6 +188,8 @@ jobs:
177188
failed-workflow:
178189
name: Failed workflow tasks
179190
runs-on: ubuntu-latest
191+
permissions:
192+
actions: write
180193
needs: [ phpcs, jshint, slack-notifications ]
181194
if: |
182195
always() &&

.github/workflows/end-to-end-tests.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ concurrency:
2626
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
2727
cancel-in-progress: true
2828

29+
# Disable permissions for all available scopes by default.
30+
# Any needed permissions should be configured at the job level.
31+
permissions: {}
32+
2933
env:
3034
LOCAL_DIR: build
3135

@@ -48,6 +52,8 @@ jobs:
4852
e2e-tests:
4953
name: E2E Tests
5054
runs-on: ubuntu-latest
55+
permissions:
56+
contents: read
5157
timeout-minutes: 20
5258
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
5359

@@ -104,12 +110,23 @@ jobs:
104110
- name: Run E2E tests
105111
run: npm run test:e2e
106112

113+
- name: Archive debug artifacts (screenshots, HTML snapshots)
114+
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
115+
if: always()
116+
with:
117+
name: failures-artifacts
118+
path: artifacts
119+
if-no-files-found: ignore
120+
107121
- name: Ensure version-controlled files are not modified or deleted
108122
run: git diff --exit-code
109123

110124
slack-notifications:
111125
name: Slack Notifications
112126
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
127+
permissions:
128+
actions: read
129+
contents: read
113130
needs: [ e2e-tests ]
114131
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
115132
with:
@@ -123,6 +140,8 @@ jobs:
123140
failed-workflow:
124141
name: Failed workflow tasks
125142
runs-on: ubuntu-latest
143+
permissions:
144+
actions: write
126145
needs: [ e2e-tests, slack-notifications ]
127146
if: |
128147
always() &&

.github/workflows/failed-workflow.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
required: true
1212
type: 'string'
1313

14+
# Disable permissions for all available scopes by default.
15+
# Any needed permissions should be configured at the job level.
16+
permissions: {}
17+
1418
jobs:
1519
# Attempts to rerun a workflow.
1620
#
@@ -20,6 +24,8 @@ jobs:
2024
failed-workflow:
2125
name: Rerun a workflow
2226
runs-on: ubuntu-latest
27+
permissions:
28+
actions: write
2329
timeout-minutes: 5
2430

2531
steps:

.github/workflows/javascript-tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ concurrency:
3838
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
3939
cancel-in-progress: true
4040

41+
# Disable permissions for all available scopes by default.
42+
# Any needed permissions should be configured at the job level.
43+
permissions: {}
44+
4145
jobs:
4246
# Runs the QUnit tests for WordPress.
4347
#
@@ -51,6 +55,8 @@ jobs:
5155
test-js:
5256
name: QUnit Tests
5357
runs-on: ubuntu-latest
58+
permissions:
59+
contents: read
5460
timeout-minutes: 20
5561
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
5662

@@ -83,6 +89,9 @@ jobs:
8389
slack-notifications:
8490
name: Slack Notifications
8591
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
92+
permissions:
93+
actions: read
94+
contents: read
8695
needs: [ test-js ]
8796
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
8897
with:
@@ -96,6 +105,8 @@ jobs:
96105
failed-workflow:
97106
name: Failed workflow tasks
98107
runs-on: ubuntu-latest
108+
permissions:
109+
actions: write
99110
needs: [ test-js, slack-notifications ]
100111
if: |
101112
always() &&

0 commit comments

Comments
 (0)