|
|
|
@ -15,13 +15,17 @@ jobs: |
|
|
|
matrix: |
|
|
|
matrix: |
|
|
|
php: [ 7.3 ] |
|
|
|
php: [ 7.3 ] |
|
|
|
os: [ ubuntu-18.04 ] |
|
|
|
os: [ ubuntu-18.04 ] |
|
|
|
wordpress: [ 5.8.1, latest ] |
|
|
|
wordpress: [ 5.8.2 ] |
|
|
|
experimental: [false] |
|
|
|
experimental: [ false ] |
|
|
|
include: |
|
|
|
include: |
|
|
|
- php: 7.4 |
|
|
|
- php: 7.4 |
|
|
|
os: ubuntu-20.04 |
|
|
|
os: ubuntu-20.04 |
|
|
|
wordpress: latest |
|
|
|
wordpress: latest |
|
|
|
experimental: true |
|
|
|
experimental: true |
|
|
|
|
|
|
|
- php: 7.4 |
|
|
|
|
|
|
|
os: ubuntu-20.04 |
|
|
|
|
|
|
|
wordpress: 'trunk' |
|
|
|
|
|
|
|
experimental: true |
|
|
|
name: Test - PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }} |
|
|
|
name: Test - PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }} |
|
|
|
|
|
|
|
|
|
|
|
env: |
|
|
|
env: |
|
|
|
@ -77,26 +81,34 @@ jobs: |
|
|
|
run: npm run lint |
|
|
|
run: npm run lint |
|
|
|
if: matrix.experimental == false |
|
|
|
if: matrix.experimental == false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run Frontend Tests |
|
|
|
|
|
|
|
run: npm run test |
|
|
|
|
|
|
|
if: matrix.experimental == false |
|
|
|
|
|
|
|
|
|
|
|
- name: Run PHP CodeSniffer |
|
|
|
- name: Run PHP CodeSniffer |
|
|
|
run: composer standards |
|
|
|
run: composer standards |
|
|
|
|
|
|
|
|
|
|
|
- name: Install WP tests |
|
|
|
- name: Install WP tests |
|
|
|
run: bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wordpress }} |
|
|
|
run: bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wordpress }} |
|
|
|
|
|
|
|
|
|
|
|
- name: Run Coverage |
|
|
|
- name: Run PHP Test and PCOV |
|
|
|
run: composer require pcov/clobber; vendor/bin/pcov clobber; vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage.xml |
|
|
|
run: composer require pcov/clobber; vendor/bin/pcov clobber; vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage.xml |
|
|
|
if: matrix.experimental == false |
|
|
|
if: matrix.experimental == false |
|
|
|
|
|
|
|
|
|
|
|
- name: Run Frontend Tests |
|
|
|
- name: Upload Coverage to Codecov |
|
|
|
run: npm run test |
|
|
|
run: bash <(curl -s https://codecov.io/bash) |
|
|
|
if: matrix.experimental == false |
|
|
|
if: matrix.experimental == false |
|
|
|
|
|
|
|
|
|
|
|
- name: Run PHP Tests |
|
|
|
- name: Run PHP Tests |
|
|
|
run: vendor/bin/phpunit |
|
|
|
run: composer test |
|
|
|
|
|
|
|
if: matrix.experimental == true && matrix.wordpress != 'trunk' |
|
|
|
|
|
|
|
|
|
|
|
- name: Upload Coverage to Codecov |
|
|
|
- name: Run PHP Tests |
|
|
|
run: bash <(curl -s https://codecov.io/bash) |
|
|
|
run: | |
|
|
|
if: matrix.experimental == false |
|
|
|
composer remove --dev phpunit/phpunit |
|
|
|
|
|
|
|
composer update --dev yoast/phpunit-polyfills --with-dependencies --ignore-platform-reqs |
|
|
|
|
|
|
|
vendor/bin/phpunit --configuration phpunit9.xml |
|
|
|
|
|
|
|
if: matrix.experimental == true && matrix.wordpress == 'trunk' |
|
|
|
|
|
|
|
|
|
|
|
- name: Prepare Build |
|
|
|
- name: Prepare Build |
|
|
|
if: startsWith(github.ref, 'refs/tags/') |
|
|
|
if: startsWith(github.ref, 'refs/tags/') |
|
|
|
|