Skip to content

v2.4.7

v2.4.7 #609

Workflow file for this run

name: PHPUnit Tests
on: [push]
defaults:
run:
working-directory: wp-express-checkout
jobs:
phpunit:
name: PHPUnit ${{ matrix.phpunit }} (PHP ${{ matrix.php }} with WordPress ${{ matrix.wordpress }})
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
ports:
- 3306/tcp
env:
MYSQL_ROOT_PASSWORD: password
# Set health checks to wait until mysql has started
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.3']
wordpress: ['latest']
phpunit: ['9.*']
# exclude:
# # excludes these php + phpunit combination
# - php: '8.0'
# phpunit: '5.7.*'
# - php: 7.4
# phpunit: '5.7.*'
# - php: 7.3
# phpunit: '5.7.*'
# - php: 7.2
# phpunit: '5.7.*'
# - php: 7.1
# phpunit: '5.7.*'
# - php: '7.0'
# phpunit: '7.5.*'
# - php: 5.6.20
# phpunit: '7.5.*'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer, cs2pr
- name: Install SVN
run: sudo apt-get update && sudo apt-get install -y subversion
- name: Install WordPress test setup
env:
WP_VERSION: ${{ matrix.wordpress }}
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
run: bash bin/install-wp-tests.sh wordpress_test root password "127.0.0.1:$MYSQL_PORT" "$WP_VERSION"
# - name: Get Composer cache directory
# id: composer-cache
# run: |
# echo "::set-output name=dir::$(composer config cache-files-dir)"
#
# - name: Setup cache
# uses: pat-s/always-upload-cache@v1.1.4
# with:
# path: ${{ steps.composer-cache.outputs.dir }}
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
# restore-keys: |
# ${{ runner.os }}-composer-
- name: Install dependencies
# Locking symfony/yaml=4.4.26, version 4.4.27 causes errors with PHP 5.6.20
run: composer global require "phpunit/phpunit=${{ matrix.phpunit }}" "symfony/yaml=4.4.26" "yoast/phpunit-polyfills" --ignore-platform-reqs
# run: composer install --no-progress --prefer-dist --optimize-autoloader
# - name: Setup problem matchers for PHPUnit
# run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run tests
run: phpunit --testdox
# run: composer run test