commit melhorias compras5
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-22 19:39:09 +02:00
parent 36dcfdf00c
commit db1615fac1
79 changed files with 4082 additions and 120 deletions
+32 -2
View File
@@ -48,6 +48,36 @@ try {
$orderDocumentMode = in_array('--order-document-only', $argv, true);
$payableInsightsMode = in_array('--payable-insights-only', $argv, true);
$budgetDistributionMode = in_array('--budget-distribution-only', $argv, true);
$categoriesMode = in_array('--requisition-categories-only', $argv, true);
$savedSearchesMode = in_array('--saved-searches-only', $argv, true);
$categoryApprovalsMode = in_array('--category-approvals-only', $argv, true);
$orderPartsMode = in_array('--budget-order-parts-only', $argv, true);
if ($orderPartsMode) {
$environment['COMMON_BUDGET_PATH'] = 'C:/laragon/www/sgf-tempo/packages/budget-control';
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/BudgetOrderPartsContractTest.php', 'tests/Feature/BudgetDistributionContractTest.php', 'tests/Feature/BudgetTest.php', 'tests/Feature/BudgetReinforcementTest.php']];
if (in_array('--order-parts-native', $argv, true)) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/BudgetOrderPartsContractTest.php',
'tests/Feature/InvoiceTest.php', 'tests/Unit/PurchaseLineAmountsTest.php', 'tests/Feature/PurchaseAwardOrderTest.php',
'--filter=BudgetOrderPartsContractTest|InvoiceTest|PurchaseLineAmountsTest|optional partial-order']];
}
if (in_array('--order-parts-recovery', $argv, true)) {
$commands = [[PHP_BINARY, 'tests/Concurrency/quotation-exchange-worker.php', $database, 'migrate'],
[PHP_BINARY, 'tests/Concurrency/budget-distribution-recovery-worker.php', $database, 'order-parts']];
}
if (in_array('--order-parts-concurrency', $argv, true)) {
$commands = [[PHP_BINARY, 'tests/Concurrency/quotation-exchange-worker.php', $database, 'migrate'],
[PHP_BINARY, 'tests/Concurrency/budget-order-parts-worker.php', $database, 'race']];
}
}
if ($categoryApprovalsMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/RequisitionApprovalLevelsTest.php', 'tests/Feature/RequisitionCategoriesTest.php']];
}
if ($savedSearchesMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/SavedProcurementSearchesTest.php', 'tests/Feature/ProcurementSearchTest.php']];
}
if ($categoriesMode) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/RequisitionCategoriesTest.php', 'tests/Feature/RequisitionCatalogueTest.php', 'tests/Feature/IncompleteRequisitionDraftTest.php', 'tests/Feature/EquipmentSparePartsTest.php']];
}
if ($budgetDistributionMode) {
$environment['COMMON_BUDGET_PATH'] = 'C:/laragon/www/sgf-tempo/packages/budget-control';
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/BudgetDistributionContractTest.php', 'tests/Feature/BudgetTest.php', 'tests/Feature/BudgetReinforcementTest.php', 'tests/Feature/InvoiceTest.php']];
@@ -67,7 +97,7 @@ try {
[PHP_BINARY, 'tests/Concurrency/budget-distribution-visual-seed.php', $database]];
}
if (in_array('--distribution-schema', $argv, true)) {
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/BudgetDistributionSchemaTest.php', 'tests/Feature/BudgetDistributionContractTest.php']];
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/BudgetDistributionSchemaTest.php', 'tests/Feature/BudgetDistributionDeploymentSchemaTest.php', 'tests/Feature/BudgetDistributionContractTest.php']];
}
}
if ($payableInsightsMode) {
@@ -118,7 +148,7 @@ try {
throw new RuntimeException('Validação PostgreSQL não aprovada.');
}
}
if ($conversionMode || $agreementMode || $orderLimitMode || $upgradeMode || $benchmarkMode || $draftMode || $searchMode || $productionMode || $configuredLevelsMode || $orderDocumentMode || $payableInsightsMode || $budgetDistributionMode) {
if ($conversionMode || $agreementMode || $orderLimitMode || $upgradeMode || $benchmarkMode || $draftMode || $searchMode || $productionMode || $configuredLevelsMode || $orderDocumentMode || $payableInsightsMode || $budgetDistributionMode || $categoriesMode || $savedSearchesMode || $categoryApprovalsMode || $orderPartsMode) {
return;
}
config(['database.connections.quotation_fx_proof' => [...$config, 'database' => $database, 'url' => null]]);