Files
meshtastic/.gitea/workflows/meshtasticator-e2e.yaml
T
eric 2198741132 ci(e2e): run simulator with current meshtastic client, not the stale 2.6.1 pin
Meshtasticator's requirements.txt pins meshtastic~=2.6.1, which predates the
meshtastic/meshtasticd image it drives; with the old client the simulator
never observed node TX packets (both e2e directions timed out). The official
meshtastic firmware_harness uses the current client against the same
simulator-mode meshtasticd, so install the sim deps with meshtastic floating
instead of the pinned requirements file.
2026-09-07 21:53:31 -07:00

100 lines
4.2 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"
# NOTE: meshtasticator/requirements.txt pins meshtastic~=2.6.1, which
# predates the meshtastic/meshtasticd image it talks to and never
# observed TX packets (both e2e directions timed out). Install the
# simulator's deps but let meshtastic float to the current client —
# the version the official firmware_harness uses against the same
# meshtasticd simulator mode.
uv pip install --python "$HOME/sim-venv/bin/python" \
meshtastic numpy matplotlib pandas \
'PyPubSub==4.0.3' simpy PyYAML protobuf docker
- name: Run Meshtasticator e2e suite
run: |
export MESHTASTICATOR_DIR="$HOME/meshtasticator"
export SIM_VENV="$HOME/sim-venv"
export E2E_VENV="plugin/.venv-contract"
bash scripts/meshtasticator_e2e/run_e2e.sh --mode docker
- name: Print simulator log (on failure)
if: failure()
run: |
echo "===== meshtasticator-sim.log (tail) ====="
tail -n 400 meshtasticator-sim.log 2>/dev/null || true
echo "===== meshtasticator-nodes.log (if any) ====="
tail -n 200 meshtasticator-nodes.log 2>/dev/null || true
echo "===== docker ps ====="
docker ps -a 2>/dev/null || true