Bump express from 4.18.2 to 4.21.0 #131
Workflow file for this run
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: Unit Tests | |
# Only run the workflow for pull requests | |
on: pull_request | |
# Cancels all previous workflow runs for pull requests that have not completed. | |
concurrency: | |
# The concurrency group contains the workflow name and the branch name for pull requests | |
# or the commit hash for any other events. | |
group: ${{ github.workflow }}-${{ github.ref}} | |
cancel-in-progress: true | |
jobs: | |
lint-js: | |
name: JavaScript linting | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
- name: Build the plugin | |
run: | | |
npm ci | |
- name: Lint JS files | |
run: npm run lint:js | |
unit-js: | |
name: JavaScript Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
- name: Build the plugin | |
run: | | |
npm ci | |
- name: Running the tests | |
run: npm run test:js | |
phpcs: | |
name: PHP coding standards | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: | |
- 8.0 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
tools: composer | |
php-version: ${{ matrix.php-versions }} | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Install Composer dependencies | |
uses: ramsey/composer-install@v3 | |
with: | |
composer-options: --prefer-dist --no-progress | |
- name: PHPCS | |
run: composer run-script phpcs | |
unit-php: | |
# Alias 'master' to 'latest' | |
name: WP ${{ matrix.wp }} and PHP ${{ matrix.php }} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.allowed_failure }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Check lowest supported WP version, with the lowest supported PHP. | |
- php: '8.0' | |
wp: '6.0' | |
allowed_failure: false | |
# Check latest WP with the lowest supported PHP. | |
- php: '8.0' | |
wp: 'master' | |
allowed_failure: false | |
# Check latest WP with the highest supported PHP. | |
- php: '8.3' | |
wp: 'master' | |
allowed_failure: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install wordpress environment | |
run: npm -g install @wordpress/env | |
- name: Setup PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer | |
- name: Install Composer dependencies | |
uses: ramsey/composer-install@v3 | |
with: | |
composer-options: --prefer-dist --no-progress | |
- name: Setup wp-env | |
run: wp-env start | |
env: | |
WP_ENV_CORE: WordPress/WordPress#${{ matrix.wp }} | |
WP_ENV_PHP_VERSION: ${{ matrix.php }} | |
- name: PHPUnit | |
run: composer test --no-interaction | |
- name: PHPUnit multisite | |
run: composer run-script test-multisite --no-interaction |