Merge pull request #64 from davisshaver/update-viem #256
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: PHPUnit Tests | |
on: [push] | |
env: | |
WP_TESTS_DIR: /github/home/wp-tests/wordpress-tests-lib | |
WP_CORE_DIR: /github/home/wp-tests/wordpress | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: [7.4] | |
wordpress-version: [latest] | |
container: | |
image: junaidbhura/wp-tests:php-${{ matrix.php-version }} | |
services: | |
mysql: | |
image: mysql:5.7.27 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Get Composer cache directory | |
id: get-composer-cache-dir | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install GMP | |
run: | | |
apt-get update --allow-releaseinfo-change | |
apt-get install -y libgmp-dev | |
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ | |
docker-php-ext-configure gmp | |
docker-php-ext-install gmp | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer install --prefer-dist --no-progress | |
- name: Install WordPress test suite | |
run: bash bin/install-wp-tests.sh wordpress_test root root mysql ${{ matrix.wordpress-version }} | |
- name: Run PHPUnit tests | |
run: composer test |