TenantAtlas/apps/platform/tests/Feature/Guards/CiConfidenceWorkflowContractTest.php
Ahmed Darrazi abdec60d7a
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 50s
Spec 210: implement CI test matrix budget enforcement
2026-04-17 19:59:25 +02:00

22 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
use Tests\Support\TestLaneManifest;
it('wires the dev push workflow to the confidence lane and publishes the lane-owned JUnit artifact bundle', function (): void {
$workflowProfile = TestLaneManifest::workflowProfile('main-confidence');
$workflowContents = (string) file_get_contents(repo_path($workflowProfile['filePath']));
expect(file_exists(repo_path($workflowProfile['filePath'])))->toBeTrue()
->and($workflowProfile['triggerClass'])->toBe('mainline-push')
->and($workflowProfile['branchFilters'])->toBe(['dev'])
->and($workflowContents)->toContain('push:')
->and($workflowContents)->toContain('- dev')
->and($workflowContents)->toContain('./scripts/platform-test-lane confidence --workflow-id=main-confidence --trigger-class=mainline-push')
->and($workflowContents)->toContain('./scripts/platform-test-report confidence --workflow-id=main-confidence --trigger-class=mainline-push')
->and($workflowContents)->toContain('./scripts/platform-test-artifacts confidence .gitea-artifacts/main-confidence --workflow-id=main-confidence --trigger-class=mainline-push')
->and($workflowContents)->toContain('name: confidence-artifacts')
->and($workflowContents)->not->toContain('test:junit', './scripts/platform-test-lane fast-feedback', './scripts/platform-test-lane heavy-governance');
});