chore(deps): update all non-major dependencies #1665
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
Lint: | |
name: lint check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup php 8.2 | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: curl, dom, exif, fileinfo, hash, json, mbstring, mysqli, sodium, openssl, pcre, imagick, xml, zip | |
ini-values: assert.exception=1, zend.assertions=1 | |
- name: Get composer cache directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Create cache for composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer | |
restore-keys: ${{ runner.os }}-composer | |
- name: Install Composer dependencies | |
run: composer install --prefer-dist --optimize-autoloader | |
- name: lint | |
run: composer lint | |
PHPUnit: | |
name: PHPUnit check for PHP ${{ matrix.php-versions }} and WP ${{ matrix.wp-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
wp-versions: ['latest'] | |
php-versions: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] | |
include: | |
- php-versions: '7.4' | |
wp-versions: 'trunk' | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: curl, dom, exif, fileinfo, hash, json, mbstring, mysqli, openssl, pcre, xml, zip | |
ini-values: assert.exception=1, zend.assertions=1 | |
- name: Install WordPress | |
run: bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 ${{ matrix.wp-versions }} | |
- name: Install PHPUnit for PHP 7.0 | |
if: matrix.php-versions == '7.0' | |
run: composer global require "phpunit/phpunit=6.*" | |
- name: Install PHPUnit for PHP 7.1 | |
if: matrix.php-versions == '7.1' | |
run: composer global require "phpunit/phpunit=7.*" | |
- name: Install PHPUnit for PHP 7.2 | |
if: matrix.php-versions == '7.2' | |
run: composer global require "phpunit/phpunit=8.*" | |
- name: Install PHPUnit for PHP 7.3 - PHP 8.0 | |
if: matrix.php-versions == '7.3' || matrix.php-versions == '7.4' || matrix.php-versions == '8.0' || matrix.php-versions == '8.1' || matrix.php-versions == '8.2' | |
run: composer global require "phpunit/phpunit=9.*" | |
# Commeting this out because PHPUnit 10 doesn't work | |
# - name: Install PHPUnit for PHP 8.1 - 8.2 | |
# if: matrix.php-versions == '8.1' || matrix.php-versions == '8.2' | |
# run: composer global require "phpunit/phpunit=10.*" | |
- name: Install phpunit-polyfills | |
run: composer global require yoast/phpunit-polyfills | |
- run: phpunit --version | |
- name: Run PHPUnit | |
run: phpunit | |
- name: Run PHPUnit multisite | |
run: WP_MULTISITE=1 phpunit | |
Build: | |
name: Build check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Node version | |
id: node_version | |
run: | | |
VERSION=`cat .nvmrc` | |
echo ::set-output name=value::$VERSION | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ steps.node_version.outputs.value }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v4 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn | |
restore-keys: ${{ runner.os }}-yarn | |
- name: yarn install | |
run: yarn install --prefer-offline | |
- name: build | |
run: | | |
yarn build |