chore(i10n): Updates for project McLuhan #751
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Standards & Tests | |
on: | |
push: | |
branches: [ dev, production ] | |
tags: | |
- '*.*.*' | |
pull_request: | |
branches: [ dev ] | |
jobs: | |
standards-and-tests: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ 8.1, 8.2 ] | |
os: [ ubuntu-20.04 ] | |
wordpress: [ '6.6.1', latest ] | |
include: | |
- experimental: true | |
- experimental: false | |
php: 8.1 | |
wordpress: '6.6.1' | |
name: Test - PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }} | |
env: | |
WP_VERSION: ${{ matrix.wordpress }} | |
WP_MULTISITE: 1 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install OS dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install libxml2-utils ghostscript poppler-utils | |
- name: Start required services | |
run: sudo systemctl start mysql.service | |
- name: Cache PHP dependencies | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: phpcs, composer | |
coverage: pcov | |
- name: Install PHP dependencies | |
run: | | |
export PATH="$HOME/.composer/vendor/bin:$PATH" | |
composer install --no-interaction | |
- name: Run PHP CodeSniffer | |
run: composer standards | |
- name: Install WP tests | |
run: bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wordpress }} | |
- name: Run PHP Tests | |
run: composer test | |
if: matrix.experimental == true | |
- name: Run PHP Tests and PCOV | |
run: composer test-coverage | |
if: matrix.experimental == false | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
if: matrix.experimental == false | |
- name: Trigger Bedrock Update | |
if: (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/production') && matrix.experimental == false | |
uses: pressbooks/composer-autoupdate-bedrock@main | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_SNS_ARN_DEV: ${{ secrets.AWS_SNS_ARN_DEV }} | |
AWS_SNS_ARN_STAGING: ${{ secrets.AWS_SNS_ARN_STAGING }} | |
INPUT_TRIGGERED_BY: ${{ github.repository }} | |
BRANCH: ${{ github.ref }} |