-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from 10up/feature/json-config-support
Feature/json config support
- Loading branch information
Showing
19 changed files
with
5,698 additions
and
275 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: PHPUnit | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: ['8.0', '8.1', '8.2', '8.3', '8.4'] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
|
||
- name: Validate composer.json | ||
run: composer validate | ||
|
||
- name: Lint PHP | ||
run: | | ||
find . -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 -P4 php -dxdebug.mode=off -l | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Run test suite | ||
run: composer run-script phpunit |
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
// First we need to load the composer autoloader, so we can use WP Mock | ||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
// Load WordPress and WP-CLI dependencies if needed. | ||
if ( ! class_exists( 'WP_CLI' ) ) { | ||
require_once dirname( __DIR__ ) . '/vendor/wp-cli/wp-cli/php/class-wp-cli.php'; | ||
} | ||
|
||
// Use patchwork | ||
WP_Mock::setUsePatchwork( true ); | ||
|
||
// Bootstrap WP_Mock to initialize built-in features | ||
WP_Mock::bootstrap(); |
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
Oops, something went wrong.