Skip to content

CI: run server tests without the pandablocks-dev-container - #95

Merged
coretl merged 1 commit into
mainfrom
remove-test-dev-container
Jun 29, 2026
Merged

CI: run server tests without the pandablocks-dev-container#95
coretl merged 1 commit into
mainfrom
remove-test-dev-container

Conversation

@coretl

@coretl coretl commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What

Run the server regression tests without the pandablocks-dev-container image — on a
plain ubuntu-latest runner, with the Python harness provisioned by uv.

Why

After #94 the Python sim/test harness is managed by uv (pyproject.toml + uv.lock),
and its only third-party dependency is numpy. So the dev-container is no longer
needed just to provide a Python-with-numpy environment for the tests.

How

_test.yml now:

  • drops the container: (and its /build volume mount), running directly on
    ubuntu-latest;
  • installs uv and uv syncs, then activates the venv — its python/python3 carry
    numpy, which the harness scripts need (they're #!/usr/bin/env python);
  • overrides BUILD_DIR to a workspace path (CONFIG.example pins the cross-build
    convention BUILD_DIR=/build/build-server, which the container had provided as a
    mounted volume).

make stays the runner; the C build (make sim_server, parse_lut_test) uses the
runner's native toolchain.

Verification

Ran the full de-containerized flow locally — make sim_server then make -C tests
(test_lut, test_exchange, test_extension, test_configs) — passes (exit 0).

🤖 Generated with Claude Code

@coretl
coretl force-pushed the remove-test-dev-container branch 2 times, most recently from e3b2977 to d074e6d Compare June 29, 2026 11:16
@coretl
coretl force-pushed the remove-test-dev-container branch from d074e6d to 51a7b37 Compare June 29, 2026 11:44
The Python sim/test harness only needs numpy, now provisioned by uv
(pyproject.toml + uv.lock, added in #92). Drop the pandablocks-dev-container
image and run the regression tests on a plain ubuntu-latest runner.

_test.yml:
- run `make tests` under `uv run --locked` — the target depends on sim_server and
  then runs `make -C tests`; uv run puts the venv's `python`/`python3` (with numpy)
  on PATH for the `#!/usr/bin/env python` harness scripts and asserts uv.lock is in
  sync;
- install valgrind (test_configs runs sim_server under valgrind, via simserver
  without -n); the container had provided it. The repo Dockerfile installs the same
  package so `make tests` behaves identically in the local dev container;
- override BUILD_DIR to a workspace path (CONFIG.example pins the cross-build
  convention BUILD_DIR=/build/build-server, which the container gave as a volume);
- add timeout-minutes so a stuck socket test can't run for hours.

Make the test harness independent of the container's BusyBox nc (ubuntu ships
netcat-openbsd, which does not close on stdin EOF without -N and would hang):
- run_with_server: probe server readiness with bash /dev/tcp instead of
  `echo … | nc localhost 8888` in a loop — this loop was the CI hang;
- simserver.in / tests/Makefile: bound the "force previous instance away" nc
  pokes with -w1.

Dockerfile: add valgrind (mirrors the workflow apt install) so a developer running
`make tests` in the dev container has the same tools as CI.

Verified locally de-containerized: test_lut / test_exchange / test_extension pass;
test_configs needs valgrind and is covered in CI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coretl
coretl force-pushed the remove-test-dev-container branch from 51a7b37 to f42c388 Compare June 29, 2026 11:47
@coretl
coretl merged commit 7e18059 into main Jun 29, 2026
7 checks passed
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