Skip to content

Commit

Permalink
ci: update WP Core Tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Sep 21, 2023
1 parent 9e4e16e commit a7a00f4
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions .github/workflows/core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ permissions:
contents: read

env:
LOCAL_PHP: "8.0-fpm"
LOCAL_DB_TYPE: "mysql"
LOCAL_DB_VERSION: "8.0"
LOCAL_PHP_MEMCACHED: "true"
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"

jobs:
Expand All @@ -37,42 +41,47 @@ jobs:
echo "PHP_FPM_UID=$(id -u)" >> "${GITHUB_ENV}"
echo "PHP_FPM_GID=$(id -g)" >> "${GITHUB_ENV}"
- name: Check out WordPress
uses: actions/[email protected]
- name: Checkout WordPress
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
repository: wordpress/wordpress-develop
path: wordpress
ref: ${{ steps.version.outputs.latest }}

- name: Check out source code
uses: actions/[email protected]
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
submodules: recursive
path: wordpress/src/wp-content/mu-plugins

- name: Patch package.json for WP 6.2.2
run: |
sed -i 's/"version": "6.2.3"/"version": "6.2.2"/' wordpress/package.json
if: steps.version.outputs.latest == '6.2.2'

- name: Tweaks
run: |
echo "define( 'VIP_JETPACK_SKIP_LOAD', 'true' );" >> "wordpress/src/wp-content/mu-plugins/000-vip-init.php"
echo "GITHUB_EVENT_NAME=pull_request" >> "wordpress/.env"
- name: Install NodeJS
uses: actions/[email protected]
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: 'wordpress/.nvmrc'
cache: npm
cache-dependency-path: 'wordpress/package-lock.json'

- name: Install Dependencies
run: npm ci
working-directory: wordpress
- name: Set up PHP
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2.25.4
with:
php-version: 8.0
coverage: none

# - name: Install Composer dependencies
# uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
# with:
# working-directory: wordpress
- name: Install Composer dependencies
run: docker-compose run --rm php composer update
run: composer install -n
working-directory: wordpress

- name: Install npm dependencies
run: npm ci
working-directory: wordpress

- name: Start Docker environment
Expand Down

0 comments on commit a7a00f4

Please sign in to comment.