commit melhorias compras3
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-22 10:56:58 +02:00
parent 4fac443dda
commit efd97e265b
130 changed files with 8917 additions and 363 deletions
+30 -1
View File
@@ -37,10 +37,39 @@ try {
}
$bankMode = in_array('--bank-accounts-only', $argv, true);
$conversionMode = in_array('--unit-conversion-only', $argv, true);
$agreementMode = in_array('--agreement-followup-only', $argv, true);
$orderLimitMode = in_array('--agreement-order-limits-only', $argv, true);
$upgradeMode = in_array('--commercial-upgrade-only', $argv, true);
$benchmarkMode = in_array('--benchmark-read-only', $argv, true);
$draftMode = in_array('--draft-preparation-only', $argv, true);
$searchMode = in_array('--procurement-search-only', $argv, true);
$productionMode = in_array('--warehouse-production-only', $argv, true);
if ($productionMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/WarehouseRequestsTest.php', 'tests/Feature/WarehouseFulfilmentTest.php', 'tests/Feature/AutomaticPurchasesTest.php']];
}
if ($searchMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/ProcurementSearchTest.php']];
}
if ($draftMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/IncompleteRequisitionDraftTest.php', 'tests/Feature/InternalRequisitionCandidateTest.php', 'tests/Feature/RequisitionCatalogueTest.php', 'tests/Feature/PurchaseProcessTest.php', 'tests/Feature/ProcurementSearchTest.php', 'tests/Feature/ProcurementReportsTest.php']];
}
if ($benchmarkMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/ProcurementSearchTest.php', 'tests/Feature/ProcurementReportsTest.php']];
}
if ($upgradeMode) {
$commands = [[PHP_BINARY, 'tests/Concurrency/commercial-upgrade-worker.php', $database]];
}
if ($conversionMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Conversion/ReceiptQuantityConversionTest.php']];
$commands[] = [PHP_BINARY, 'tests/Concurrency/unit-conversion-worker.php', $database, 'race'];
}
if ($agreementMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/AgreementFollowupTest.php', 'tests/Feature/SupplyPlanningTest.php'],
[PHP_BINARY, 'tests/Concurrency/agreement-followup-report-worker.php', $database]];
}
if ($orderLimitMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/PurchaseAwardOrderTest.php', '--filter=per order']];
}
if ($bankMode && ! in_array('--concurrency-only', $argv, true)) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/SupplierBankAccountsTest.php', 'tests/Feature/SupplierBankTest.php',
'tests/Feature/ExternalPaymentTest.php', 'tests/Feature/PaymentIntegrationTest.php', 'tests/Feature/QuotationExchangeFinanceTest.php']];
@@ -54,7 +83,7 @@ try {
throw new RuntimeException('Validação PostgreSQL não aprovada.');
}
}
if ($conversionMode) {
if ($conversionMode || $agreementMode || $orderLimitMode || $upgradeMode || $benchmarkMode || $draftMode || $searchMode || $productionMode) {
return;
}
config(['database.connections.quotation_fx_proof' => [...$config, 'database' => $database, 'url' => null]]);