mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Add runner execution observability and lifecycle hardening for self-hosted GitHub Actions runners, including: - scheduled artifact cleanup job for cached runner tarballs/templates - workflow_job in_progress handling to mark executions as running - safer cleanup failure handling and non-functional server fallback - persisted workflow job HTML URLs with execution "Open" links in UI - configurable runner group name sync (UI + provisioning + GitHub API) - webhook events persistence and auto-fix for missing required events - strict enum/status checks and related model cast/query improvements Also includes migrations and expanded feature/unit coverage for webhook, provisioning, cleanup, and runner group/event sync behaviors.
33 lines
1.2 KiB
PHP
33 lines
1.2 KiB
PHP
<?php
|
|
|
|
use App\Models\GithubRunnerExecution;
|
|
|
|
it('prefers the direct workflow job html url when available', function () {
|
|
$execution = new GithubRunnerExecution([
|
|
'workflow_job_id' => 987654,
|
|
'repository_full_name' => 'test-org/test-repo',
|
|
'workflow_job_html_url' => 'https://github.com/test-org/test-repo/actions/runs/111/job/987654',
|
|
]);
|
|
|
|
expect($execution->workflowJobUrl())->toBe('https://github.com/test-org/test-repo/actions/runs/111/job/987654');
|
|
});
|
|
|
|
it('builds a fallback github actions search url when direct url is missing', function () {
|
|
$execution = new GithubRunnerExecution([
|
|
'workflow_job_id' => 987654,
|
|
'repository_full_name' => 'test-org/test-repo',
|
|
'workflow_job_html_url' => null,
|
|
]);
|
|
|
|
expect($execution->workflowJobUrl())->toBe('https://github.com/test-org/test-repo/actions?query=987654');
|
|
});
|
|
|
|
it('returns null when there is not enough data to build a workflow url', function () {
|
|
$execution = new GithubRunnerExecution([
|
|
'workflow_job_id' => null,
|
|
'repository_full_name' => null,
|
|
'workflow_job_html_url' => null,
|
|
]);
|
|
|
|
expect($execution->workflowJobUrl())->toBeNull();
|
|
});
|