Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52983 closed defect (bug) (fixed)

Prevent PHPUnit tests from running on `push` for forks and private mirrors

Reported by: desrosj's profile desrosj Owned by: desrosj's profile desrosj
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch fixed-major
Focuses: Cc:

Description

In [50441], the PHPUnit workflow was updated to allow WordPress to be run from src. The workflow was reorganized to take advantage of this change, but it has resulted in unnecessary workflow runs on forks and private mirrors.

Before [50441], the first job (which built and prepared WordPress for testing) was required to complete before the second one (that performed all the actual testing) could take place. Because the first job now only cancels incomplete workflow runs in pull requests, the testing job runs always.

This can be fixed with an if: statement to ensure the jobs only run in the correct context.

Attachments (1)

52983.diff (637 bytes) - added by desrosj 4 years ago.

Download all attachments as: .zip

Change History (9)

@desrosj
4 years ago

#1 @desrosj
4 years ago

  • Milestone changed from Awaiting Review to 5.8

This will need to be backported back to the 5.2 branch.

#2 @desrosj
4 years ago

  • Keywords fixed-major added

This was fixed in [50670], but appears Trac is currently having issues with that commit. The next commit should fix that.

#3 @desrosj
4 years ago

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

In 50671:

Build/Test Tools: Prevent PHPUnit tests on push for forks/private mirrors.

The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every push event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Merges [50670] to the 5.7 branch.
Fixes #52983.

#4 @desrosj
4 years ago

In 50672:

Build/Test Tools: Prevent PHPUnit tests on push for forks/private mirrors.

The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every push event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Merges [50670] to the 5.6 branch.
Fixes #52983.

#5 @desrosj
4 years ago

In 50673:

Build/Test Tools: Prevent PHPUnit tests on push for forks/private mirrors.

The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every push event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Merges [50670] to the 5.5 branch.
Fixes #52983.

#6 @desrosj
4 years ago

In 50674:

Build/Test Tools: Prevent PHPUnit tests on push for forks/private mirrors.

The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every push event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Merges [50670] to the 5.4 branch.
Fixes #52983.

#7 @desrosj
4 years ago

In 50675:

Build/Test Tools: Prevent PHPUnit tests on push for forks/private mirrors.

The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every push event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Merges [50670] to the 5.3 branch.
Fixes #52983.

#8 @desrosj
4 years ago

In 50676:

Build/Test Tools: Prevent PHPUnit tests on push for forks/private mirrors.

The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every push event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Merges [50670] to the 5.2 branch.
Fixes #52983.

Note: See TracTickets for help on using tickets.