-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from alleyinteractive/feature/next
Repo updates and maintenance
- Loading branch information
Showing
30 changed files
with
181 additions
and
228 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,19 +1,13 @@ | ||
# EditorConfig helps maintain consistent coding styles for developers working on the same project across various editors and IDEs. | ||
# See https://editorconfig.org. | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.php] | ||
[*.{html,php}] | ||
indent_size = 4 | ||
indent_style = tab | ||
|
||
[*.xml] | ||
indent_size = 4 |
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 }}-MS${{ matrix.multisite }} | ||
cancel-in-progress: true | ||
# Name the job in the matrix | ||
name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }} multisite ${{ matrix.multisite }}" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="alleyinteractive/wp-psr16" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"> | ||
<description>PHP_CodeSniffer standard for alleyinteractive/wp-psr16.</description> | ||
|
||
<!-- Include Alley Rules --> | ||
<rule ref="Alley-Interactive"/> | ||
|
||
<!-- | ||
Pass some flags to PHPCS: | ||
p flag: Show progress of the run. | ||
s flag: Show sniff codes in all reports. | ||
--> | ||
<arg value="ps"/> | ||
|
||
<file>src/</file> | ||
<file>tests/</file> | ||
<exclude-pattern>vendor/</exclude-pattern> | ||
|
||
<!-- Strip the filepaths down to the relevant bit. --> | ||
<arg name="basepath" value="./"/> | ||
|
||
<!-- Check up to 20 files simultaneously. --> | ||
<arg name="parallel" value="20"/> | ||
|
||
<!-- Set severity to 1 to see everything that isn't effectively turned off. --> | ||
<arg name="severity" value="1"/> | ||
|
||
<!-- In effect, set the minimum supported version of WordPress to the latest version. --> | ||
<config name="minimum_supported_wp_version" value="99.0"/> | ||
|
||
<!-- Define the prefixes that can be used by the plugin --> | ||
<rule ref="WordPress.NamingConventions.PrefixAllGlobals"> | ||
<properties> | ||
<property name="prefixes" type="array"> | ||
<element value="alley"/> | ||
</property> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="WordPress.Files.FileName"> | ||
<exclude-pattern>tests/*</exclude-pattern> | ||
</rule> | ||
</ruleset> |
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,65 +1,75 @@ | ||
{ | ||
"name": "alleyinteractive/wp-psr16", | ||
"description": "PSR-16 implementations for WordPress that cache data in the object cache, as transients, as options, and as object metadata.", | ||
"type": "library", | ||
"homepage": "https://github.com/alleyinteractive/wp-psr16", | ||
"license": "GPL-2.0-or-later", | ||
"type": "library", | ||
"authors": [ | ||
{ | ||
"name": "Alley", | ||
"email": "info@alley.com" | ||
} | ||
], | ||
"config": { | ||
"allow-plugins": { | ||
"alleyinteractive/composer-wordpress-autoloader": true, | ||
"dealerdirect/phpcodesniffer-composer-installer": true, | ||
"pestphp/pest-plugin": true | ||
}, | ||
"lock": false, | ||
"sort-packages": true | ||
}, | ||
"provide": { | ||
"psr/simple-cache-implementation": "2.0 || 3.0" | ||
}, | ||
"homepage": "https://github.com/alleyinteractive/wp-psr16", | ||
"require": { | ||
"php": "^8.1", | ||
"php": "^8.2", | ||
"alleyinteractive/composer-wordpress-autoloader": "^1.0", | ||
"psr/simple-cache": "^2.0 || ^3.0", | ||
"symfony/clock": "^6.4" | ||
}, | ||
"require-dev": { | ||
"alleyinteractive/alley-coding-standards": "^2.0", | ||
"cache/integration-tests": "dev-master", | ||
"friendsofphp/php-cs-fixer": "^3.39", | ||
"mantle-framework/testkit": "^0.12", | ||
"ergebnis/composer-normalize": "^2.44", | ||
"mantle-framework/testkit": "^1.2", | ||
"szepeviktor/phpstan-wordpress": "^1.3" | ||
}, | ||
"provide": { | ||
"psr/simple-cache-implementation": "2.0 || 3.0" | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Alley\\": "tests/alley/" | ||
"Alley\\WP\\Tests\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"alleyinteractive/composer-wordpress-autoloader": true, | ||
"dealerdirect/phpcodesniffer-composer-installer": true, | ||
"ergebnis/composer-normalize": true, | ||
"pestphp/pest-plugin": true | ||
}, | ||
"lock": false, | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"composer-normalize": { | ||
"indent-size": 2, | ||
"indent-style": "space" | ||
}, | ||
"wordpress-autoloader": { | ||
"autoload": { | ||
"Alley\\": "src/alley/" | ||
}, | ||
"autoload-dev": { | ||
"Alley\\": "tests/alley/" | ||
"Alley\\WP\\": "src/" | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"fixer": "php-cs-fixer -v fix --allow-risky=yes", | ||
"pre-install-cmd": [ | ||
"@tidy" | ||
], | ||
"post-install-cmd": [ | ||
"@tidy" | ||
], | ||
"phpcbf": "phpcbf .", | ||
"phpcs": "phpcs .", | ||
"phpstan": "phpstan --memory-limit=512M", | ||
"phpstan": "phpstan -v --memory-limit=512M", | ||
"phpunit": "phpunit", | ||
"test": [ | ||
"@phpcs", | ||
"@phpstan", | ||
"@phpunit" | ||
] | ||
], | ||
"tidy": "[ $COMPOSER_DEV_MODE -eq 0 ] || composer normalize" | ||
} | ||
} | ||
} |
Oops, something went wrong.