Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 25 additions & 23 deletions .github/workflows/reusable-check-built-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
# - Checks out the repository.
# - Sets up Node.js.
# - Installs Composer dependencies.
# - Logs general debug information about the runner.
# - Installs npm dependencies.
# - Logs general debug information about the runner.
# - Builds CSS file using SASS.
# - Builds Emoji files.
# - Builds bundled Root Certificate files.
Expand Down Expand Up @@ -47,33 +47,35 @@ jobs:
node-version-file: '.nvmrc'
cache: npm

# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
- parallel:
- name: Install npm Dependencies
run: npm ci

- name: Log debug information
run: |
npm --version
node --version
curl --version
git --version
# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")

- name: Install npm Dependencies
run: npm ci
- name: Log debug information
run: |
npm --version
node --version
curl --version
git --version

- name: Run SASS precommit tasks
run: npm run grunt precommit:css
- parallel:
- name: Run SASS precommit tasks
run: npm run grunt precommit:css

- name: Run Emoji precommit task
run: npm run grunt precommit:emoji
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Emoji precommit task
run: npm run grunt precommit:emoji
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run certificate tasks
run: npm run grunt copy:certificates
- name: Run certificate tasks
run: npm run grunt copy:certificates

- name: Build WordPress
run: npm run build:dev
Expand Down
111 changes: 68 additions & 43 deletions .github/workflows/reusable-end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ jobs:
# - Sets environment variables.
# - Checks out the repository.
# - Sets up Node.js.
# - Logs debug information about the GitHub Action runner.
# - Sets up PHP.
# - Installs npm dependencies.
# - Installs Composer dependencies.
# - Install Playwright browsers.
# - Logs debug information about the GitHub Action runner.
# - Builds WordPress to run from the `build` directory.
# - Starts the WordPress Docker container.
# - Logs the running Docker containers.
Expand Down Expand Up @@ -81,33 +83,55 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
cache: npm

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

- name: Install npm Dependencies
run: npm ci

- name: Install Playwright browsers
if: ${{ inputs.install-playwright }}
run: npx playwright install --with-deps chromium

- name: Build WordPress
run: npm run build

- name: Start Docker environment
run: |
npm run env:start
- parallel:
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
cache: npm

##
# This allows Composer dependencies to be installed using a single step.
#
# Since the tests are currently run within the Docker containers where the PHP version varies,
# the same PHP version needs to be configured for the action runner machine so that the correct
# dependency versions are installed and cached.
##
- name: Set up PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
php-version: '${{ inputs.php }}'
coverage: none

- parallel:
- name: Install npm Dependencies
run: npm ci

# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")

- name: Install Playwright browsers
if: ${{ inputs.install-playwright }}
run: npx playwright install --with-deps chromium

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

- parallel:
- name: Build WordPress
run: npm run build

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

- name: Log running Docker containers
run: docker ps -a
Expand All @@ -122,24 +146,25 @@ jobs:
docker compose run --rm php locale -a

- name: Install WordPress
env:
LOCAL_SCRIPT_DEBUG: ${{ inputs.LOCAL_SCRIPT_DEBUG }}
run: npm run env:install

- name: Install Gutenberg
if: ${{ inputs.install-gutenberg }}
run: |
npm run env:cli -- plugin install gutenberg \
${{ inputs.gutenberg-version && '--version="${GUTENBERG_VERSION}"' || '' }} \
--path="/var/www/${LOCAL_DIR}"
env:
GUTENBERG_VERSION: ${{ inputs.gutenberg-version }}
LOCAL_SCRIPT_DEBUG: ${{ inputs.LOCAL_SCRIPT_DEBUG }}

- name: Install additional languages
run: |
npm run env:cli -- language core install de_DE --path="/var/www/${LOCAL_DIR}"
npm run env:cli -- language plugin install de_DE --all --path="/var/www/${LOCAL_DIR}"
npm run env:cli -- language theme install de_DE --all --path="/var/www/${LOCAL_DIR}"
- parallel:
- name: Install Gutenberg
if: ${{ inputs.install-gutenberg }}
run: |
npm run env:cli -- plugin install gutenberg \
${{ inputs.gutenberg-version && '--version="${GUTENBERG_VERSION}"' || '' }} \
--path="/var/www/${LOCAL_DIR}"
env:
GUTENBERG_VERSION: ${{ inputs.gutenberg-version }}

- name: Install additional languages
run: |
npm run env:cli -- language core install de_DE --path="/var/www/${LOCAL_DIR}"
npm run env:cli -- language plugin install de_DE --all --path="/var/www/${LOCAL_DIR}"
npm run env:cli -- language theme install de_DE --all --path="/var/www/${LOCAL_DIR}"

- name: Run E2E tests
run: npm run test:e2e
Expand Down
52 changes: 27 additions & 25 deletions .github/workflows/reusable-phpstan-static-analysis-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,38 +48,40 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
cache: npm
- parallel:
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
cache: npm

- name: Set up PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
php-version: ${{ inputs.php-version }}
coverage: none
tools: cs2pr
- name: Set up PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
php-version: ${{ inputs.php-version }}
coverage: none
tools: cs2pr

- name: General debug information
run: |
npm --version
node --version
composer --version
- parallel:
# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")

# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
- name: Install npm dependencies
run: npm ci --ignore-scripts

- name: General debug information
run: |
npm --version
node --version
composer --version

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

- name: Install npm dependencies
run: npm ci --ignore-scripts

- name: Build WordPress
run: npm run build:dev

Expand Down
Loading
Loading