WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 2 weeks ago

Last modified 2 weeks ago

#39486 closed defect (bug) (fixed)

In Travis, skip some tests when not on trunk

Reported by: jorbin Owned by: johnbillion
Milestone: 4.8 Priority: normal
Severity: normal Version: 3.9
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description

There are some tests that are around to serve as reminders for modern development such as to ensure the copy write year is updated and ensure that the readme PHP recommendation matches the recommendation on wordpress.org

For the automated running of tests, tests such as these should be skipped by detecting the branch we are on in travis, and only running the test when the branch is master.

We can use travis enviornement variable TRAVIS_BRANCH to detect the branch.

Attachments (2)

39486.diff (5.8 KB) - added by netweb 3 months ago.
39486.2.diff (32.8 KB) - added by jorbin 4 weeks ago.

Download all attachments as: .zip

Change History (25)

#1 @dd32
3 months ago

I'm good with this - I came to the same conclusion myself last night after dealing with the failures.

If someone wants to put together a patch for trunk which skips these misc tests, I'll test and backport it to all the relevant branches.

@netweb
3 months ago

#2 @netweb
3 months ago

In this first pass 39486.diff

  • A new PHPUnit Grunt task is added grunt phpunit:trunk-only
  • PHPUnit tests that should be excluded from Travis CI branch jobs should be added to the @group trunk-only

Notes: Untested at this stage, thinking out loud in a patch :)

This ticket was mentioned in Slack in #core by joemcgill. View the logs.


2 months ago

#4 @joemcgill
2 months ago

  • Summary changed from In Travis, skip some tests when not on truck to In Travis, skip some tests when not on trunk

@jorbin
4 weeks ago

#5 follow-up: @jorbin
4 weeks ago

I took an alternative take that minimizes the changes needed. Feedback welcome.

#6 in reply to: ↑ 5 ; follow-up: @netweb
4 weeks ago

Replying to jorbin:

I took an alternative take that minimizes the changes needed. Feedback welcome.

Neat +1

Can you remove the erroneous extras in the 39486.2.diff and go forth and commit :)

#7 in reply to: ↑ 6 ; follow-up: @jorbin
4 weeks ago

Replying to netweb:

Can you remove the erroneous extras in the 39486.2.diff and go forth and commit :)

Now I'm wondering if I broke grunt upload_patch at some point since those changes don't appear during svn diff. ¯\_(ツ)_/¯

#8 in reply to: ↑ 7 @netweb
4 weeks ago

Replying to jorbin:

Now I'm wondering if I broke grunt upload_patch at some point since those changes don't appear during svn diff. ¯\_(ツ)_/¯

Not sure, but the "extras" in the patch looked like they were from /build, but in fact they are prefixed from /src

Had you performed any build/src juggling recently?

This ticket was mentioned in Slack in #core by jorbin. View the logs.


3 weeks ago

#10 @johnbillion
2 weeks ago

  • Milestone changed from Awaiting Review to 4.8
  • Owner set to johnbillion
  • Status changed from new to reviewing

#11 @johnbillion
2 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 40239:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin
Fixes #39486

#12 @johnbillion
2 weeks ago

In 40240:

Build/Test tools: Revert [40239] due to unrelated changes.

See #39486

#13 @johnbillion
2 weeks ago

In 40241:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

#14 @johnbillion
2 weeks ago

In 40242:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.5 branch.

#15 @johnbillion
2 weeks ago

In 40243:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.4 branch.

#16 @johnbillion
2 weeks ago

In 40244:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.3 branch.

#17 @johnbillion
2 weeks ago

In 40245:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.2 branch.

#18 @johnbillion
2 weeks ago

In 40246:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.1 branch.

#19 @johnbillion
2 weeks ago

In 40247:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.0 branch.

#20 @johnbillion
2 weeks ago

In 40248:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 3.9 branch.

#21 @johnbillion
2 weeks ago

  • Version set to 3.9

#22 @johnbillion
2 weeks ago

In 40249:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.6 branch.

#23 @johnbillion
2 weeks ago

In 40250:

Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486

Merges [40241] to the 4.7 branch.

Note: See TracTickets for help on using tickets.