Merge pull request #122 from humanmade/migrate-authors-post-type #462
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 | |
on: | |
push: | |
branches: | |
- 'develop' | |
- 'main' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
php: ['7.4'] | |
include: | |
- php: '8.0' | |
experimental: true | |
fail-fast: false | |
name: WP 5.9 / PHP ${{ matrix.php }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Install PHP | |
uses: shivammathur/[email protected] | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mysqli, xmlwriter | |
coverage: none | |
tools: composer:v2 | |
- name: Debugging | |
run: | | |
php --version | |
php -m | |
composer --version | |
mysql --version | |
- name: Get Composer Cache Directory | |
id: composer-cache-dir | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache PHP Dependencies | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }}-wp5.9 | |
- name: Install PHP Dependencies | |
run: | | |
composer install --prefer-dist --no-progress --no-suggest --no-interaction --ignore-platform-reqs | |
- name: Run the tests | |
run: | | |
sudo systemctl start mysql.service | |
composer test:ut | |
env: | |
MYSQL_DATABASE: wordpress | |
WP_TESTS_DB_PASS: root |