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
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1ed79e4
Move from Travis to Github Actions
mslinnea Nov 16, 2024
59a792d
phpcs part 1
mslinnea Nov 16, 2024
1451311
PHPCS
mslinnea Nov 19, 2024
69a2179
move github actions files
mslinnea Nov 19, 2024
a69717f
Specify test matrix
mslinnea Nov 22, 2024
702b729
Remove remaining references to travis
mslinnea Nov 22, 2024
952db3c
ES 8.x compat - remove type from endpoint
mslinnea Nov 22, 2024
a6282d6
phpcs ignores
mslinnea Nov 23, 2024
984ed0f
Skips tests due to WP core bug with offset & pagination
mslinnea Dec 6, 2024
d00d908
formatting changes
mslinnea Dec 6, 2024
b857984
Update composer.json
mslinnea Dec 13, 2024
f2a880a
Update .github/workflows/coding-standards.yml
mslinnea Dec 13, 2024
572ca2e
whitespace
mslinnea Dec 13, 2024
a2a3cbb
Update comment block
mslinnea Dec 13, 2024
2d5c664
Update comment block
mslinnea Dec 13, 2024
3b244aa
formatting
mslinnea Dec 13, 2024
f9aa00b
formatting
mslinnea Dec 13, 2024
5a517a4
mysql test matrix
mslinnea Dec 13, 2024
e3d228e
add mysql version to test name
mslinnea Dec 13, 2024
78aff10
Update MySQL test matrix
mslinnea Dec 13, 2024
5b0ebc7
formatting
mslinnea Dec 13, 2024
14fb9b1
update test setup function
mslinnea Dec 13, 2024
1cc297e
Update .github/workflows/coding-standards.yml
mslinnea Dec 26, 2024
6cec296
Update .github/workflows/coding-standards.yml
mslinnea Dec 26, 2024
ca43537
Update .github/workflows/unit-tests.yml
mslinnea Dec 26, 2024
3bb279e
Update .github/workflows/unit-tests.yml
mslinnea Dec 26, 2024
a4065b3
Update composer.json
mslinnea Dec 26, 2024
4d3c5d8
Mark as knownWPBug
mslinnea Dec 26, 2024
f2a0d09
Revert "Update .github/workflows/unit-tests.yml"
mslinnea Dec 26, 2024
c7382d0
Revert "Update .github/workflows/unit-tests.yml"
mslinnea Dec 26, 2024
2d6400c
Update actions and use ubuntu version with svn
mslinnea Dec 26, 2024
28d4e7d
Use ubuntu latest and install svn
mslinnea Dec 26, 2024
05e2834
Revert "Mark as knownWPBug"
mslinnea Dec 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Skips tests due to WP core bug with offset & pagination
mslinnea committed Dec 6, 2024

Verified

This commit was signed with the committer’s verified signature.
commit 984ed0f1e718b39c4f49288953a0af35a2dfafb7
3 changes: 2 additions & 1 deletion tests/query/results.php
Original file line number Diff line number Diff line change
@@ -287,9 +287,10 @@ function test_query_paged_and_posts_per_page() {
}

/**
* @ticket 18897
* @ticket https://core.trac.wordpress.org/ticket/18897
*/
function test_query_offset_and_paged() {
$this->markTestSkipped('Setting offset parameter ignores the pages parameter. See https://core.trac.wordpress.org/ticket/18897');
$posts = $this->q->query('paged=2&offset=3');

$expected = array (
3 changes: 2 additions & 1 deletion tests/query/shoehorn.php
Original file line number Diff line number Diff line change
@@ -199,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

*/
function test_wp_query_offset_and_paged() {
$this->markTestSkipped('Setting offset parameter ignores the pages parameter. See https://core.trac.wordpress.org/ticket/18897');
$posts = $this->q->query('paged=2&offset=3&es=true');

$expected = array (