32 lines
2.4 KiB
PHP
32 lines
2.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Tests\Support\TestLaneManifest;
|
|
|
|
it('wires the pull-request workflow only to the fast-feedback lane with the checked-in wrappers and artifact staging helper', function (): void {
|
|
$workflowProfile = TestLaneManifest::workflowProfile('pr-fast-feedback');
|
|
$workflowContents = (string) file_get_contents(repo_path($workflowProfile['filePath']));
|
|
|
|
expect(file_exists(repo_path($workflowProfile['filePath'])))->toBeTrue()
|
|
->and($workflowProfile['triggerClass'])->toBe('pull-request')
|
|
->and($workflowProfile['laneBindings'])->toBe(['fast-feedback'])
|
|
->and($workflowContents)->toContain('pull_request:')
|
|
->and($workflowContents)->toContain('permissions:')
|
|
->and($workflowContents)->toContain('actions: read')
|
|
->and($workflowContents)->toContain('contents: read')
|
|
->and($workflowContents)->toContain('opened', 'reopened', 'synchronize')
|
|
->and($workflowContents)->toContain('fetch-depth: 0')
|
|
->and($workflowContents)->toContain('TENANTATLAS_PR_TARGET: ${{ github.base_ref }}')
|
|
->and($workflowContents)->toContain('if [[ -z "${TENANTATLAS_PR_TARGET}" ]]')
|
|
->and($workflowContents)->toContain('git fetch origin "${TENANTATLAS_PR_TARGET}:refs/remotes/origin/${TENANTATLAS_PR_TARGET}"')
|
|
->and($workflowContents)->toContain('bash scripts/check-ui-productization-coverage "origin/${TENANTATLAS_PR_TARGET}" --pull-request-target="${TENANTATLAS_PR_TARGET}"')
|
|
->and($workflowContents)->not->toContain('git fetch origin dev', 'scripts/check-ui-productization-coverage origin/dev')
|
|
->and($workflowContents)->toContain('./scripts/platform-test-lane fast-feedback --workflow-id=pr-fast-feedback --trigger-class=pull-request')
|
|
->and($workflowContents)->toContain('TENANTATLAS_GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}')
|
|
->and($workflowContents)->toContain('./scripts/platform-test-report fast-feedback --workflow-id=pr-fast-feedback --trigger-class=pull-request --fetch-latest-history')
|
|
->and($workflowContents)->toContain('./scripts/platform-test-artifacts fast-feedback .gitea-artifacts/pr-fast-feedback --workflow-id=pr-fast-feedback --trigger-class=pull-request')
|
|
->and($workflowContents)->toContain('name: fast-feedback-artifacts')
|
|
->and($workflowContents)->not->toContain('confidence --workflow-id=pr-fast-feedback', 'heavy-governance', 'browser --workflow-id=pr-fast-feedback');
|
|
});
|