Skip to content
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

Github Actions and PHPCS updates #108

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

Conversation

mslinnea
Copy link
Member

@mslinnea mslinnea commented Nov 19, 2024

  • Adds Github Actions for Tests and Coding Standards
  • Upgrades code to pass Alley Coding Standards

Resolves #98

@alley-ci
Copy link

alley-ci commented Nov 19, 2024

Composer Lock Changes

The following is a summary of the changes to the composer.lock file(s) in this pull request and should be reviewed carefully:

composer.lock

Package Operation Previous Version Version
alleyinteractive/alley-coding-standards 🟢 added v2.0.0
automattic/vipwpcs 🟢 added 3.0.1
dealerdirect/phpcodesniffer-composer-installer 🟢 added v1.0.0
doctrine/instantiator 🟢 added 2.0.0
myclabs/deep-copy 🟢 added 1.12.1
nikic/php-parser 🟢 added v5.3.1
phar-io/manifest 🟢 added 2.0.4
phar-io/version 🟢 added 3.2.1
phpcompatibility/php-compatibility 🟢 added 9.3.5
phpcompatibility/phpcompatibility-paragonie 🟢 added 1.3.3
phpcompatibility/phpcompatibility-wp 🟢 added 2.1.5
phpcsstandards/phpcsextra 🟢 added 1.2.1
phpcsstandards/phpcsutils 🟢 added 1.0.12
phpunit/php-code-coverage 🟢 added 9.2.32
phpunit/php-file-iterator 🟢 added 3.0.6
phpunit/php-invoker 🟢 added 3.1.1
phpunit/php-text-template 🟢 added 2.0.4
phpunit/php-timer 🟢 added 5.0.3
phpunit/phpunit 🟢 added 9.6.21
sebastian/cli-parser 🟢 added 1.0.2
sebastian/code-unit 🟢 added 1.0.8
sebastian/code-unit-reverse-lookup 🟢 added 2.0.3
sebastian/comparator 🟢 added 4.0.8
sebastian/complexity 🟢 added 2.0.3
sebastian/diff 🟢 added 4.0.6
sebastian/environment 🟢 added 5.1.5
sebastian/exporter 🟢 added 4.0.6
sebastian/global-state 🟢 added 5.0.7
sebastian/lines-of-code 🟢 added 1.0.4
sebastian/object-enumerator 🟢 added 4.0.4
sebastian/object-reflector 🟢 added 2.0.4
sebastian/recursion-context 🟢 added 4.0.5
sebastian/resource-operations 🟢 added 3.0.4
sebastian/type 🟢 added 3.2.1
sebastian/version 🟢 added 3.0.2
sirbrillig/phpcs-variable-analysis 🟢 added v2.11.19
squizlabs/php_codesniffer 🟢 added 3.11.0
theseer/tokenizer 🟢 added 1.2.3
wp-coding-standards/wpcs 🟢 added 3.1.0
yoast/phpunit-polyfills 🟢 added 1.1.2

This is an automated summary of the changes to the composer.lock files in this pull request.

@mslinnea mslinnea linked an issue Nov 25, 2024 that may be closed by this pull request
composer.json Outdated Show resolved Hide resolved
phpcs.xml.dist Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
.github/workflows/coding-standards.yml Outdated Show resolved Hide resolved
phpcs.xml.dist Outdated Show resolved Hide resolved
.github/workflows/unit-tests.yml Outdated Show resolved Hide resolved
adapters/searchpress.php Outdated Show resolved Hide resolved
class-es-wp-meta-query.php Outdated Show resolved Hide resolved
tests/query/author.php Outdated Show resolved Hide resolved
tests/query/results.php Outdated Show resolved Hide resolved
Copy link
Contributor

@renatonascalves renatonascalves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌵

.github/workflows/coding-standards.yml Outdated Show resolved Hide resolved
.github/workflows/coding-standards.yml Outdated Show resolved Hide resolved
.github/workflows/unit-tests.yml Outdated Show resolved Hide resolved
.github/workflows/unit-tests.yml Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
@@ -190,9 +199,10 @@ function test_wp_query_paged_and_posts_per_page() {
}

/**
* @ticket 18897
* @ticket https://core.trac.wordpress.org/ticket/18897
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ticket is not actually a valid phpDoc.

Suggested change
* @ticket https://core.trac.wordpress.org/ticket/18897
* @link https://core.trac.wordpress.org/ticket/18897

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ticket is a special annotation that the core phpunit test suite adds. If I recall correctly (and I may not, it's been a long time!), based on the status of the ticket, this test would either be run or skipped automatically. Was that feature not working on GitHub Actions, or did the test start failing after the annotation was changed to the full url? Or does core's test suite work differently now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't working to skip the tests in Github Actions or locally. I can investigate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently that feature was removed back in 2021. Womp womp.

@ticket is still a valid annotation, but since it no longer functions in a useful way for us, I agree that @link is better. If we want, we can still conditionally skip the test based on the status of the ticket by calling:

$this->knownWPBug( 18897 );

That might be better than always skipping it? 🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mboynes TIL. Thank you for the link. 〽️

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you would think that would be better, but not at the moment, as it failed due to no access to trac!! Therefore, I reverted back...

trac-inaccessible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from TravisCI to GitHub Actions
4 participants