fix: restore completed task workspace access (#3577)

This commit is contained in:
Carlos Florêncio
2026-09-12 16:26:35 +01:00
committed by GitHub
parent 2b9d5f1a5d
commit d8eefc5718
78 changed files with 4180 additions and 481 deletions
+1
View File
@@ -32,6 +32,7 @@ FROM mcr.microsoft.com/playwright:v1.61.1-noble AS runtime
ENV DEBIAN_FRONTEND=noninteractive \
PNPM_HOME=/pnpm \
COREPACK_HOME=/root/.cache/node/corepack \
PATH=/pnpm:$PATH
# --- System packages -------------------------------------------------------
@@ -13,6 +13,8 @@ REPO_ROOT = Path(__file__).resolve().parents[2]
DOCKERFILE = REPO_ROOT / ".github" / "docker" / "ci-base" / "Dockerfile"
IMAGE_WORKFLOW = REPO_ROOT / ".github" / "workflows" / "ci-base-image.yml"
E2E_WORKFLOW = REPO_ROOT / ".github" / "workflows" / "e2e-tests.yml"
BACKEND_WORKFLOW = REPO_ROOT / ".github" / "workflows" / "backend-tests.yml"
FRONTEND_WORKFLOW = REPO_ROOT / ".github" / "workflows" / "frontend-tests.yml"
LINT_WORKFLOW = REPO_ROOT / ".github" / "workflows" / "lint-action-pinning.yml"
IMAGE_DIGEST_RESOLVER = REPO_ROOT / ".github" / "scripts" / "resolve-image-digest.sh"
VALID_IMAGE_INDEX = (
@@ -154,6 +156,18 @@ cat "${FAKE_DOCKER_MANIFEST}"
self.assertIn("type=gha,scope=runtime", workflow)
self.assertIn("desktop-latest", workflow)
def test_container_jobs_use_the_baked_corepack_cache(self) -> None:
dockerfile = DOCKERFILE.read_text(encoding="utf-8")
self.assertIn("COREPACK_HOME=/root/.cache/node/corepack", dockerfile)
for workflow_path in (E2E_WORKFLOW, BACKEND_WORKFLOW, FRONTEND_WORKFLOW):
workflow = workflow_path.read_text(encoding="utf-8")
self.assertIn(
"COREPACK_HOME: /root/.cache/node/corepack",
workflow,
workflow_path.name,
)
def test_desktop_job_uses_image_without_live_bootstrap_downloads(self) -> None:
workflow = E2E_WORKFLOW.read_text(encoding="utf-8")
desktop_job = job_block(workflow, "desktop-e2e", "e2e-report")
+5
View File
@@ -32,6 +32,11 @@ permissions:
contents: read
packages: read
env:
# Container jobs may override HOME. Keep Corepack pointed at the pnpm cache
# prepared in the CI image.
COREPACK_HOME: /root/.cache/node/corepack
jobs:
runner_plan:
name: Plan external runner allocation
+5
View File
@@ -38,6 +38,11 @@ permissions:
# pull the kandev-ci image from GHCR via GITHUB_TOKEN.
packages: read
env:
# Container jobs may override HOME. Keep Corepack pointed at the pnpm cache
# prepared in the CI image so setup does not require an npm registry request.
COREPACK_HOME: /root/.cache/node/corepack
jobs:
runner_plan:
name: Plan external runner allocation
+5
View File
@@ -28,6 +28,11 @@ permissions:
contents: read
packages: read
env:
# Container jobs may override HOME. Keep Corepack pointed at the pnpm cache
# prepared in the CI image.
COREPACK_HOME: /root/.cache/node/corepack
jobs:
runner_plan:
name: Plan external runner allocation