-
Notifications
You must be signed in to change notification settings - Fork 1
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
54 changed files
with
177 additions
and
196 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
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,45 @@ | ||
name: "All Pull Request Tests" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
# We use a single job to ensure that all steps run in the same environment and | ||
# reduce the number of minutes used. | ||
pr-tests: | ||
# Don't run on draft PRs | ||
if: github.event.pull_request.draft == false | ||
# Timeout after 10 minutes | ||
timeout-minutes: 10 | ||
# Define a matrix of PHP/WordPress versions to test against | ||
strategy: | ||
matrix: | ||
php: [8.2, 8.3] | ||
wordpress: ["latest"] | ||
multisite: [false, true] | ||
runs-on: ubuntu-latest | ||
# Cancel any existing runs of this workflow | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }} | ||
cancel-in-progress: true | ||
# Name the job in the matrix | ||
name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }}" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run General Tests | ||
# See https://github.com/alleyinteractive/action-test-general for more options | ||
uses: alleyinteractive/action-test-general@develop | ||
|
||
- name: Run PHP Tests | ||
# See https://github.com/alleyinteractive/action-test-php for more options | ||
uses: alleyinteractive/action-test-php@develop | ||
with: | ||
php-version: '${{ matrix.php }}' | ||
audit-command: 'composer audit --no-dev --ansi --no-interaction' | ||
wordpress-version: '${{ matrix.wordpress }}' | ||
wordpress-multisite: '${{ matrix.multisite }}' | ||
skip-wordpress-install: 'true' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,53 +1,65 @@ | ||
{ | ||
"name": "alleyinteractive/wp-type-extensions", | ||
"description": "PHP interfaces and implementations for WordPress.", | ||
"type": "library", | ||
"license": "GPL-2.0-or-later", | ||
"authors": [ | ||
{ | ||
"name": "Alley", | ||
"email": "info@alley.com" | ||
} | ||
], | ||
"config": { | ||
"allow-plugins": { | ||
"alleyinteractive/composer-wordpress-autoloader": true, | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
"name": "alleyinteractive/wp-type-extensions", | ||
"description": "PHP interfaces and implementations for WordPress.", | ||
"license": "GPL-2.0-or-later", | ||
"type": "library", | ||
"authors": [ | ||
{ | ||
"name": "Alley", | ||
"email": "info@alley.com" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.2", | ||
"alleyinteractive/laminas-validator-extensions": "^2.0", | ||
"alleyinteractive/wp-match-blocks": "^3.0", | ||
"spatie/once": "^3.1" | ||
}, | ||
"lock": false | ||
}, | ||
"require": { | ||
"php": "^8.1", | ||
"alleyinteractive/laminas-validator-extensions": "^2.0", | ||
"alleyinteractive/wp-match-blocks": "^3.0", | ||
"spatie/once": "^3.1" | ||
}, | ||
"require-dev": { | ||
"alleyinteractive/alley-coding-standards": "^1.0.0", | ||
"friendsofphp/php-cs-fixer": "^3.8", | ||
"mantle-framework/testkit": "^0.9", | ||
"szepeviktor/phpstan-wordpress": "^1.1" | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Alley\\": "tests/alley/" | ||
} | ||
}, | ||
"extra": { | ||
"wordpress-autoloader": { | ||
"autoload": { | ||
"Alley\\": "src/alley/" | ||
}, | ||
"autoload-dev": { | ||
"Alley\\": "tests/alley/" | ||
} | ||
"require-dev": { | ||
"alleyinteractive/alley-coding-standards": "^2.0", | ||
"ergebnis/composer-normalize": "^2.44", | ||
"mantle-framework/testkit": "^1.2", | ||
"szepeviktor/phpstan-wordpress": "^1.3" | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Alley\\WP\\Tests\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"alleyinteractive/composer-wordpress-autoloader": true, | ||
"dealerdirect/phpcodesniffer-composer-installer": true, | ||
"ergebnis/composer-normalize": true | ||
}, | ||
"lock": false, | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"wordpress-autoloader": { | ||
"autoload": { | ||
"Alley\\WP\\": "src/" | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"pre-install-cmd": [ | ||
"@tidy" | ||
], | ||
"post-install-cmd": [ | ||
"@tidy" | ||
], | ||
"phpcbf": "phpcbf", | ||
"phpcs": "phpcs", | ||
"phpstan": "phpstan -v --memory-limit=512M", | ||
"phpunit": "phpunit", | ||
"test": [ | ||
"@phpcs", | ||
"@phpstan", | ||
"@phpunit" | ||
], | ||
"tidy": "[ $COMPOSER_DEV_MODE -eq 0 ] || composer normalize" | ||
} | ||
}, | ||
"scripts": { | ||
"fixer": "php-cs-fixer -v fix --allow-risky=yes", | ||
"phpcbf": "phpcbf", | ||
"phpcs": "phpcs", | ||
"phpstan": "phpstan --memory-limit=512M", | ||
"phpunit": "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
bootstrap="tests/bootstrap.php" | ||
backupGlobals="false" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
> | ||
<testsuite name="unit"> | ||
<directory suffix=".php">tests/alley/wp/</directory> | ||
</testsuite> | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.2/phpunit.xsd" | ||
cacheDirectory=".phpunit.result.cache"> | ||
<testsuites> | ||
<testsuite name="Feature"> | ||
<directory>tests/Feature</directory> | ||
</testsuite> | ||
<testsuite name="Unit"> | ||
<directory>tests/Unit</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="MANTLE_USE_SQLITE" value="true"/> | ||
<env name="WP_SKIP_DB_CREATE" value="true"/> | ||
</php> | ||
</phpunit> |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.