-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
34 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Test | ||
name: PHPUnit Tests | ||
|
||
env: | ||
COMPOSER_VERSION: "2" | ||
|
@@ -10,15 +10,12 @@ on: | |
push: | ||
branches: | ||
- develop | ||
- develop-v1 | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
- develop-v1 | ||
|
||
jobs: | ||
|
||
phpunit: | ||
name: ${{ matrix.php }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -29,33 +26,35 @@ jobs: | |
os: [ ubuntu-latest ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Set standard 10up cache directories | ||
run: | | ||
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}" | ||
- name: Prepare composer cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE }} | ||
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
composer-${{ env.COMPOSER_VERSION }}- | ||
- name: Set PHP version | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: phpunit-polyfills, composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer update -W | ||
|
||
- name: Setup WP Tests | ||
run: bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 | ||
|
||
- name: PHPUnit | ||
run: './vendor/bin/phpunit' | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Set standard 10up cache directories | ||
run: | | ||
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}" | ||
- name: Prepare composer cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE }} | ||
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
composer-${{ env.COMPOSER_VERSION }}- | ||
- uses: getong/[email protected] | ||
|
||
- name: Set PHP version | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: phpunit-polyfills, composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer update -W | ||
|
||
- name: Setup WP Tests | ||
run: bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 | ||
|
||
- name: PHPUnit | ||
run: composer run test |