Skip to content

fix(ci): Make install-test HTTP server startup deterministic#145

Merged
misonijnik merged 3 commits into
mainfrom
misonijnik/fix-ci-ps1
May 15, 2026
Merged

fix(ci): Make install-test HTTP server startup deterministic#145
misonijnik merged 3 commits into
mainfrom
misonijnik/fix-ci-ps1

Conversation

@misonijnik
Copy link
Copy Markdown
Member

No description provided.

The fixed 2s sleep before running install.ps1 was not reliable on the
windows-latest runner: when the Python http.server had not started yet,
the install script failed with "connection actively refused". The
failure was masked until #143 surfaced install.ps1 exit codes.

- Replace the fixed sleep with a 30s readiness poll that fails loudly
  and dumps the server log when the server never becomes reachable.
- Add actions/setup-python so the runner has a known-good Python on
  PATH regardless of windows-latest image migrations.
- Extract the duplicated server-startup and binary-verification logic
  into two composite actions (cli/serve-archive, cli/verify-installed-binary),
  used by all three install-test jobs.
- Standardize on http://127.0.0.1:8080 across platforms.
- Allow .github in .gitignore so the new composite actions are tracked
  despite the broad .* hidden-file rule.
@misonijnik misonijnik force-pushed the misonijnik/fix-ci-ps1 branch from 3ed5819 to bc7ffe8 Compare May 15, 2026 02:32
…ogic

The previous fix split the windows-latest install-test into a "serve
archive" step plus a "run install.ps1" step. The python http.server
started in the first step was killed by the runner's Job Object at step
end, so install.ps1 in the next step hit "connection actively refused".

- Inline the python server start, readiness poll and install.ps1 invocation
  into a single step in test-install-ps1. Add an inline comment recording
  why the step cannot be split.
- Extract the readiness-poll algorithm into scripts/ci/wait-for-http-server.{sh,ps1}
  so each shell has one canonical implementation. cli/serve-archive now
  delegates to the bash helper; the Windows step calls the pwsh helper.
- Reject windows-latest from cli/serve-archive with a clear error pointing
  callers at the inline pattern.
- Parameterize the Windows step's SERVE_PORT and SERVE_TIMEOUT through env
  so the constants live in one place per call site.
The install-test jobs still inlined per-OS build commands and the parse
logic that translates an install script's OPENTAINT_BINARY_PATH line into
a step output. Pull those out so each job reads as a declarative step
list.

- Add cli/build-test-archive composite action that handles the three
  per-OS build + checksum recipes behind one uses: call.
- Add scripts/ci/run-installer-sh.sh and run-installer-pwsh.ps1 that run
  an install script, echo its output, and propagate OPENTAINT_BINARY_PATH
  to GITHUB_OUTPUT. The bash and pwsh install-test jobs each have one
  canonical implementation of this parse rule now.
- Rewrite the three install-test jobs around these helpers; the Windows
  step still inlines server orchestration due to the Job Object
  constraint, but everything else collapses to uses: / script calls.
@misonijnik misonijnik merged commit 46ecd41 into main May 15, 2026
18 of 23 checks passed
@misonijnik misonijnik deleted the misonijnik/fix-ci-ps1 branch May 15, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant