Publish curated Unraid-AppOps-Gateway source from 945a919d1a3bbd2bb5bd21eb221fc9b58d795d80
This commit is contained in:
1 parent
aa9f7d178c
commit
fd4b962bdd
10 files changed
+884
-37
No files matched your search
@@ -11,7 +11,7 @@ import tarfile
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
import yaml
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
PROFILES = ("checks", "backend", "frontend", "security", "browser", "build")
|
||||
@@ -30,6 +30,39 @@ BASE_LABELS = {
|
||||
}
|
||||
|
||||
|
||||
def test_post_activation_producer_uses_fixed_job_local_build_route_and_preserves_artifact_contract():
|
||||
workflow = yaml.safe_load((ROOT / ".gitea/workflows/ci-task-images.yml").read_text(encoding="utf-8"))
|
||||
events = workflow.get("on", workflow.get(True))
|
||||
assert events == {"push": {"branches": ["main"]}}
|
||||
assert workflow["permissions"] == {"contents": "read"}
|
||||
assert workflow["concurrency"]["cancel-in-progress"] is False
|
||||
assert set(workflow["jobs"]) == {"build"}
|
||||
job = workflow["jobs"]["build"]
|
||||
assert job["runs-on"] == "itworx-ci-build"
|
||||
assert job["timeout-minutes"] == 90
|
||||
assert "services" not in job and "container" not in job
|
||||
checkout, build, upload = job["steps"]
|
||||
assert checkout["uses"] == "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
|
||||
assert checkout["with"] == {
|
||||
"fetch-depth": 1, "persist-credentials": False,
|
||||
"github-server-url": "https://gitea.example.com",
|
||||
}
|
||||
assert build["run"].strip() == (
|
||||
'set -euo pipefail\n'
|
||||
'output="${RUNNER_TEMP}/ci-task-images-${GITHUB_SHA}"\n'
|
||||
'bash scripts/build_ci_task_images.sh "$GITHUB_SHA" "$GITHUB_RUN_ID" "$output" --job-local'
|
||||
)
|
||||
assert "env" not in build
|
||||
assert upload["uses"] == "ChristopherHX/gitea-upload-artifact@62ac910c5d3dfa85c7cb2df15afe2e342b2407c2"
|
||||
assert upload.get("if") is None
|
||||
assert upload["with"] == {
|
||||
"name": "ci-task-images-${{ github.sha }}",
|
||||
"path": "${{ runner.temp }}/ci-task-images-${{ github.sha }}/*",
|
||||
"if-no-files-found": "error", "retention-days": 90,
|
||||
"compression-level": 6, "overwrite": False,
|
||||
}
|
||||
|
||||
|
||||
def _run_producer(tmp_path: Path, mutation: str = ""):
|
||||
repo = tmp_path / "repository"
|
||||
repo.mkdir()
|
||||
@@ -121,6 +154,7 @@ def _run_producer(tmp_path: Path, mutation: str = ""):
|
||||
capture_output=True,
|
||||
text=True,
|
||||
timeout=30,
|
||||
check=False,
|
||||
)
|
||||
return result, output, revision, tree
|
||||
|
||||
|
||||
Reference in new issue
Block a user