Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#39486 closed defect (bug) (fixed)

In Travis, skip some tests when not on trunk

Reported by: jorbin's profile jorbin Owned by: johnbillion's profile 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 8 years ago.
39486.2.diff (32.8 KB) - added by jorbin 8 years ago.

Download all attachments as: .zip

Change History (26)

#1 @dd32
8 years 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
8 years ago

#2 @netweb
8 years 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.


8 years ago

#4 @joemcgill
8 years ago

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

@jorbin
8 years ago

#5 follow-up: @jorbin
8 years ago

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

#6 in reply to: ↑ 5 ; follow-up: @netweb
8 years 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
8 years 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
8 years 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.


8 years ago

#10 @johnbillion
8 years ago

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

#11 @johnbillion
8 years 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
8 years ago

In 40240:

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

See #39486

#13 @johnbillion
8 years 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
8 years 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
8 years 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
8 years 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
8 years 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
8 years 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
8 years 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
8 years 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
8 years ago

  • Version set to 3.9

#22 @johnbillion
8 years 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
8 years 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.

#24 @desrosj
4 years ago

In 49264:

Build/Test Tools: Skip some tests when not in the primary branch.

This skips time sensitive tests when GitHub Actions workflows are not being run on master branch.

See #50401, #39486.

Note: See TracTickets for help on using tickets.