Revert "Shard unit test runs" (#39344)
Revert "Shard unit test runs (#39302)"
This reverts commit 9ee44947e0
.
This commit is contained in:
parent
8020f3407b
commit
147db933be
|
@ -28,20 +28,11 @@ jobs:
|
|||
matrix:
|
||||
php: ['7.4', '8.0']
|
||||
wp: ['latest']
|
||||
unittests: ['shard1', 'shard2']
|
||||
include:
|
||||
- wp: nightly
|
||||
php: '7.4'
|
||||
unittests: 'shard1'
|
||||
- wp: nightly
|
||||
php: '7.4'
|
||||
unittests: 'shard2'
|
||||
- wp: '6.1'
|
||||
php: 7.4
|
||||
unittests: 'shard1'
|
||||
- wp: '6.1'
|
||||
php: 7.4
|
||||
unittests: 'shard2'
|
||||
services:
|
||||
database:
|
||||
image: mysql:5.6
|
||||
|
@ -87,4 +78,4 @@ jobs:
|
|||
env:
|
||||
WP_ENV_CORE: ${{ steps.parseMatrix.outputs.wpVersion }}
|
||||
WP_ENV_PHP_VERSION: ${{ matrix.php }}
|
||||
run: pnpm --filter=woocommerce test:unit:env --testsuite ${{ matrix.unittests }}
|
||||
run: pnpm --filter=woocommerce test:unit:env
|
||||
|
|
|
@ -28,28 +28,14 @@ jobs:
|
|||
matrix:
|
||||
php: ['7.4', '8.0']
|
||||
wp: ['latest']
|
||||
unittests: ['shard1', 'shard2']
|
||||
include:
|
||||
- wp: nightly
|
||||
php: '7.4'
|
||||
unittests: 'shard1'
|
||||
- wp: nightly
|
||||
php: '7.4'
|
||||
unittests: 'shard2'
|
||||
- wp: '6.1'
|
||||
php: 7.4
|
||||
unittests: 'shard1'
|
||||
- wp: '6.1'
|
||||
php: 7.4
|
||||
unittests: 'shard2'
|
||||
- wp: 'latest'
|
||||
php: '7.4'
|
||||
hpos: true
|
||||
unittests: 'shard1'
|
||||
- wp: 'latest'
|
||||
php: '7.4'
|
||||
hpos: true
|
||||
unittests: 'shard2'
|
||||
services:
|
||||
database:
|
||||
image: mysql:5.6
|
||||
|
@ -86,4 +72,4 @@ jobs:
|
|||
env:
|
||||
WP_ENV_CORE: ${{ steps.parseMatrix.outputs.wpVersion }}
|
||||
WP_ENV_PHP_VERSION: ${{ matrix.php }}
|
||||
run: pnpm --filter=woocommerce test:unit:env --testsuite ${{ matrix.unittests }}
|
||||
run: pnpm --filter=woocommerce test:unit:env
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Shard the unit tests running on GitHub Actions.
|
|
@ -9,18 +9,10 @@
|
|||
verbose="true"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||
<testsuites>
|
||||
<testsuite name="wc-unittests-all">
|
||||
<testsuite name="WooCommerce Test Suite">
|
||||
<directory suffix=".php">./tests/legacy/unit-tests</directory>
|
||||
<directory suffix=".php">./tests/php</directory>
|
||||
</testsuite>
|
||||
<testsuite name="shard1">
|
||||
<directory suffix=".php">./tests/legacy/unit-tests</directory>
|
||||
<directory suffix=".php">./tests/php</directory>
|
||||
<exclude>./tests/legacy/unit-tests/woocommerce-admin</exclude>
|
||||
</testsuite>
|
||||
<testsuite name="shard2">
|
||||
<directory suffix=".php">./tests/legacy/unit-tests/woocommerce-admin</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<coverage includeUncoveredFiles="true">
|
||||
<include>
|
||||
|
|
|
@ -7,19 +7,10 @@
|
|||
|
||||
use Automattic\WooCommerce\Internal\Admin\CustomerEffortScoreTracks;
|
||||
|
||||
// phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
|
||||
|
||||
if ( ! class_exists( 'CurrentScreenMock' ) ) {
|
||||
/**
|
||||
* Class CurrentScreenMock
|
||||
*/
|
||||
class CurrentScreenMock {
|
||||
/**
|
||||
* CustomerEffortScoreTracks only works in wp-admin, so let's fake it.
|
||||
*/
|
||||
public function in_admin() {
|
||||
return true;
|
||||
}
|
||||
// CustomerEffortScoreTracks only works in wp-admin, so let's fake it.
|
||||
class CurrentScreenMock {
|
||||
public function in_admin() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +42,7 @@ class WC_Admin_Tests_CES_Tracks extends WC_Unit_Test_Case {
|
|||
}
|
||||
|
||||
public function tearDown(): void {
|
||||
parent::tearDown();
|
||||
parent::tearDown();
|
||||
if ( $this->current_screen_backup ) {
|
||||
$GLOBALS['current_screen'] = $this->current_screen_backup;
|
||||
}
|
||||
|
|
|
@ -666,12 +666,8 @@ class WC_Admin_Tests_Reports_Orders_Stats extends WC_Unit_Test_Case {
|
|||
$orders[] = $order;
|
||||
}
|
||||
|
||||
$this->assertEquals( 15, count( WC_Helper_Queue::get_all_pending() ) );
|
||||
|
||||
WC_Helper_Queue::run_all_pending();
|
||||
|
||||
$this->assertEquals( 0, count( WC_Helper_Queue::get_all_pending() ) );
|
||||
|
||||
$data_store = new OrdersStatsDataStore();
|
||||
|
||||
// Test for the current hour.
|
||||
|
|
|
@ -1,21 +1,5 @@
|
|||
<?php
|
||||
|
||||
// phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
|
||||
|
||||
if ( ! class_exists( 'CurrentScreenMock' ) ) {
|
||||
/**
|
||||
* Class CurrentScreenMock
|
||||
*/
|
||||
class CurrentScreenMock {
|
||||
/**
|
||||
* CustomerEffortScoreTracks only works in wp-admin, so let's fake it.
|
||||
*/
|
||||
public function in_admin() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class WC_Orders_Tracking_Test.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue