Skip to content

Commit ead2dd9

Browse files
JonZeollaclaude
andcommitted
feat: expand Windows smoke test with init, test, build, and docker run
Add end-to-end verification steps to the Windows CI job: initialize the generated project, run tests, build the Docker image, verify the image runs, and confirm the zenable CLI is functional. Also add diagnostic logging to the post-gen hook when the zenable binary cannot be found after installation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dc2abc2 commit ead2dd9

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,31 @@ jobs:
208208
}
209209
210210
Write-Host "Windows smoke test passed: project generated and verified successfully"
211+
- name: Initialize generated project
212+
shell: bash
213+
run: |
214+
cd "$RUNNER_TEMP/replace-me"
215+
task -v init
216+
- name: Run tests
217+
shell: bash
218+
run: |
219+
cd "$RUNNER_TEMP/replace-me"
220+
task -v test
221+
- name: Build Docker image
222+
shell: bash
223+
run: |
224+
cd "$RUNNER_TEMP/replace-me"
225+
task -v build
226+
- name: Verify Docker image
227+
shell: bash
228+
run: |
229+
docker run --rm --entrypoint python3 zenable-io/replace-me:latest \
230+
-c "from replace_me import __version__; print(__version__)"
231+
- name: Verify zenable CLI
232+
shell: bash
233+
run: |
234+
export PATH="$HOME/.zenable/bin:$PATH"
235+
zenable version
211236
finalizer:
212237
# This gives us something to set as required in the repo settings. Some projects use dynamic fan-outs using matrix strategies and the fromJSON function, so
213238
# you can't hard-code what _should_ run vs not. Having a finalizer simplifies that so you can just check that the finalizer succeeded, and if so, your

hooks/post_gen_project.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,18 @@ def _install_zenable_binary() -> bool:
216216
install_script = _download_url(install_url)
217217
_verify_checksum(install_script, expected_checksum)
218218

219-
subprocess.run(
219+
result = subprocess.run(
220220
cmd,
221221
input=install_script,
222222
check=True,
223223
capture_output=True,
224224
timeout=120,
225225
env=env,
226226
)
227+
if result.stdout:
228+
LOG.info("Zenable installer stdout: %s", result.stdout.decode("utf-8", errors="replace").strip())
229+
if result.stderr:
230+
LOG.info("Zenable installer stderr: %s", result.stderr.decode("utf-8", errors="replace").strip())
227231
return True
228232
except ValueError:
229233
LOG.warning("Zenable install script checksum verification failed")
@@ -260,6 +264,14 @@ def opportunistically_install_zenable_tools() -> None:
260264

261265
zenable_bin = _find_zenable_binary()
262266
if not zenable_bin:
267+
# Diagnostic: log what the installer actually created
268+
zenable_dir = Path.home() / ".zenable"
269+
if zenable_dir.exists():
270+
contents = [str(p.relative_to(zenable_dir)) for p in zenable_dir.rglob("*")]
271+
LOG.warning("Install dir %s contents: %s", zenable_dir, contents)
272+
else:
273+
LOG.warning("Install directory does not exist: %s", zenable_dir)
274+
LOG.warning("Current PATH: %s", os.environ.get("PATH", ""))
263275
LOG.warning("Zenable CLI was installed but could not be found in PATH or default location.")
264276
return
265277

0 commit comments

Comments
 (0)