-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add initial functionality and tests #1
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b6b5dde
Add initial functionality and tests
dlh01 6dede40
Define DB credentials
dlh01 18d57a3
Clean up pasta
dlh01 bcb5a17
Bypass testkit failures
dlh01 132fc24
Single quote
dlh01 cba13d2
Bump to testkit 0.2
dlh01 3348179
Revert "Bypass testkit failures"
dlh01 3bc4df0
Add and apply PHP-CS-Fixer
dlh01 574f585
Reposition comment
dlh01 bfd1335
Clarify `find_result()` description in README
dlh01 5477a51
Include PHP-CS-Fixer config in .gitattributes
dlh01 1c866fa
Spacin'
dlh01 4ee023e
Apply 'final_class' fixer rule
dlh01 83abdd3
Merge remote-tracking branch 'origin/1.0' into 1.0
dlh01 c911c4a
Switch to autoloading via Composer classmap
dlh01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,26 @@ | ||
# | ||
# Exclude these files from release archives. | ||
# | ||
# This will also make the files unavailable when using Composer with `--prefer-dist`. | ||
# If you develop using Composer, use `--prefer-source`. | ||
# | ||
# Via WPCS. | ||
# | ||
/phpcs.xml export-ignore | ||
/phpunit.xml export-ignore | ||
/.github export-ignore | ||
/tests export-ignore | ||
|
||
# | ||
# Auto detect text files and perform LF normalization. | ||
# | ||
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ | ||
# | ||
* text=auto | ||
|
||
# | ||
# The above will handle all files not found below. | ||
# | ||
*.md text | ||
*.php text | ||
*.inc text |
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,21 @@ | ||
## Summary | ||
|
||
As titled. | ||
|
||
## Notes for reviewers | ||
|
||
None. | ||
|
||
## Changelog entries | ||
|
||
### Added | ||
|
||
### Changed | ||
|
||
### Deprecated | ||
|
||
### Removed | ||
|
||
### Fixed | ||
|
||
### Security |
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,31 @@ | ||
name: Composer Validation | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.1] | ||
steps: | ||
- name: Cancel previous runs of this workflow (pull requests only) | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Run Composer config validation | ||
run: composer validate --strict |
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,38 @@ | ||
name: Coding Standards | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
phpcs: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [7.4] | ||
montchr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- name: Cancel previous runs of this workflow (pull requests only) | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Install composer dependencies | ||
uses: nick-invision/retry@v1 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer install | ||
|
||
- name: Run PHPCS | ||
run: composer run phpcs |
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,56 @@ | ||||||||||||||
name: Tests | ||||||||||||||
|
||||||||||||||
on: | ||||||||||||||
pull_request: | ||||||||||||||
|
||||||||||||||
jobs: | ||||||||||||||
phpunit: | ||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||
strategy: | ||||||||||||||
fail-fast: true | ||||||||||||||
matrix: | ||||||||||||||
php: [8.1, 8.0, 7.4] | ||||||||||||||
wp_version: ["latest"] | ||||||||||||||
can_fail: [false] | ||||||||||||||
multisite: [0,1] | ||||||||||||||
montchr marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
services: | ||||||||||||||
mysql: | ||||||||||||||
image: mysql:5.7 | ||||||||||||||
env: | ||||||||||||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||||||||||||||
ports: | ||||||||||||||
- 3306:3306 | ||||||||||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
continue-on-error: ${{ matrix.multisite == '1' }} | ||||||||||||||
|
||||||||||||||
name: WordPress ${{ matrix.wp_version }} @ PHP ${{ matrix.php }} (WP_MULTISITE=${{ matrix.multisite }}) | ||||||||||||||
montchr marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
env: | ||||||||||||||
CACHEDIR: /tmp | ||||||||||||||
WP_CORE_DIR: /tmp/wordpress | ||||||||||||||
WP_VERSION: ${{ matrix.wp_version }} | ||||||||||||||
montchr marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
WP_MULTISITE: ${{ matrix.multisite }} | ||||||||||||||
WP_DB_HOST: 127.0.0.1 | ||||||||||||||
WP_DB_USER: root | ||||||||||||||
WP_DB_PASSWORD: '""' | ||||||||||||||
|
||||||||||||||
steps: | ||||||||||||||
- name: Check out code | ||||||||||||||
uses: actions/checkout@v3 | ||||||||||||||
|
||||||||||||||
- name: Set up PHP | ||||||||||||||
uses: shivammathur/setup-php@v2 | ||||||||||||||
with: | ||||||||||||||
php-version: ${{ matrix.php }} | ||||||||||||||
extensions: json, mysqli, curl, dom, exif, fileinfo, hash, imagick, mbstring, openssl, pcre, xml, zip | ||||||||||||||
tools: composer:v2 | ||||||||||||||
coverage: none | ||||||||||||||
|
||||||||||||||
- name: Install Composer dependencies | ||||||||||||||
uses: nick-invision/retry@v2 | ||||||||||||||
with: | ||||||||||||||
timeout_minutes: 5 | ||||||||||||||
max_attempts: 5 | ||||||||||||||
command: composer install | ||||||||||||||
|
||||||||||||||
- name: Run PHPUnit | ||||||||||||||
run: composer run 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vendor | ||
composer.lock | ||
.php_cs.cache | ||
.phpunit.result.cache |
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,7 @@ | ||
# Changelog | ||
|
||
This library adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/en/1.0.0/). | ||
|
||
## 1.0.0 | ||
|
||
Initial release. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No 8.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my knowledge, Composer config validation depend on the PHP version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah: Composer config validation doesn't depend on the PHP version