Files
meshtastic/.gitea/workflows/meshtasticator-e2e.yaml
T
eric 4485ec3814 ci(e2e): on-demand Meshtasticator e2e job for the docker-enabled runner
Adds .gitea/workflows/meshtasticator-e2e.yaml (workflow_dispatch until
validated green, pull_request trigger commented out): builds the pinned
Hermes contract env like release.yaml, installs the plugin with deps,
checks out Meshtasticator at a pinned commit, installs the simulator's
own (conflicting-version) requirements in an isolated venv, then runs
scripts/meshtasticator_e2e/run_e2e.sh --mode docker.

Supporting changes:
- run_e2e.sh: SIM_VENV support; automatic localhost->daemon TCP forwards
  (scripts/meshtasticator_e2e/tcp_forward.py) when DOCKER_HOST is a tcp://
  daemon, because Meshtasticator hardcodes localhost for its node control
  connections; node-boot settle wait; fixed docker cleanup (container
  'Meshtastic', volume 'Meshtasticator').
- e2e tests: connect via a module-long event loop in a background thread
  (adapter requires a running loop for watchdog + inbound dispatch, so
  per-call asyncio.run was wrong) with retry while the node TCP API boots.
- README: sim-venv guidance, remote-daemon forwarding, CI section.

Docker access follows the deployment examples in
eric/actions-docker (docker is available to runner jobs).
2026-09-07 21:06:01 -07:00

91 lines
3.6 KiB
YAML

name: meshtasticator-e2e
# Radio-level end-to-end validation against Meshtasticator's interactive
# simulator (real MeshtasticD per node + simulated LoRa PHY). Runs on demand
# until it is validated green on the runner; afterwards switch `on` to also
# trigger on pull_request touching plugin/ and this workflow.
#
# Docker access follows the deployment examples in
# https://git.ericxliu.me/eric/actions-docker (docker is available to jobs);
# Meshtasticator's docker mode publishes node TCP API ports (4404+n) from the
# meshtastic/meshtasticd container and the simulator connects to them on
# localhost. scripts/meshtasticator_e2e/run_e2e.sh starts localhost->daemon
# TCP forwards automatically when DOCKER_HOST is a tcp:// daemon, which is how
# this job is configured.
on:
workflow_dispatch:
# pull_request:
# paths:
# - 'plugin/**'
# - 'scripts/meshtasticator_e2e/**'
# - '.gitea/workflows/meshtasticator-e2e.yaml'
concurrency:
# One e2e run at a time: Meshtasticator hardcodes the container/volume name
# ("Meshtastic"/"Meshtasticator") on the shared docker daemon.
group: meshtasticator-e2e
cancel-in-progress: true
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
DOCKER_HOST: tcp://docker.local:2375
MESHTASTICATOR_COMMIT: 17ceb8231079d87b070abc6132181e4c6b20202d
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.13 (matches Hermes image)
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
run: pip install uv
# --- Hermes gateway contract env (mirrors .gitea/workflows/release.yaml) ---
- name: Clone pinned Hermes gateway source (deployed image tag)
run: |
git clone --depth 1 --branch v2026.8.31 \
https://github.com/NousResearch/hermes-agent.git plugin/.hermes-src
test "$(git -C plugin/.hermes-src rev-parse HEAD)" = \
"29112bef099274229cadff79cdff7bf7b99c4b77"
- name: Editable install hermes-agent + pytest + plugin (meshtastic client lib)
run: |
uv venv --python 3.13 plugin/.venv-contract
uv pip install --python plugin/.venv-contract/bin/python -e plugin/.hermes-src
uv pip install --python plugin/.venv-contract/bin/python pytest
uv pip install --python plugin/.venv-contract/bin/python -e plugin
# --- Simulator env (isolated: meshtasticator pins meshtastic~=2.6.1) ---
- name: Clone Meshtasticator at pinned commit
run: |
git clone https://github.com/meshtastic/meshtasticator.git "$HOME/meshtasticator"
git -C "$HOME/meshtasticator" checkout "$MESHTASTICATOR_COMMIT"
test "$(git -C "$HOME/meshtasticator" rev-parse HEAD)" = "$MESHTASTICATOR_COMMIT"
- name: Simulator venv (its own requirements + docker SDK)
run: |
uv venv --python 3.13 "$HOME/sim-venv"
uv pip install --python "$HOME/sim-venv/bin/python" \
-r "$HOME/meshtasticator/requirements.txt" docker
- name: Run Meshtasticator e2e suite
run: |
export MESHTASTICATOR_DIR="$HOME/meshtasticator"
export SIM_VENV="$HOME/sim-venv"
export E2E_VENV="plugin/.venv-contract"
scripts/meshtasticator_e2e/run_e2e.sh --mode docker
- name: Print simulator log (on failure)
if: failure()
run: |
echo "===== meshtasticator-sim.log ====="
tail -n 200 meshtasticator-sim.log 2>/dev/null || true
echo "===== docker ps ====="
docker ps -a 2>/dev/null || true