Files
pyxis/.github/workflows/test.yml
torlando-tech 5e2c3a52bb CI: gate every PR on python-interop conformance
Hook equivalent to reticulum-kt's :rns-test:test and reticulum-swift's
Tests/Interop/. Each pyxis PR now runs the microReticulum conformance
bridge against canonical Python RNS, so a submodule-pin bump or any
change that breaks byte-equivalence with python is caught at PR time
instead of only by the reticulum-conformance repo's own CI (which
runs against pyxis main, not the PR branch).

Mechanism:
- Check out THIS pyxis branch + reticulum-conformance + markqvist/Reticulum
  + markqvist/LXMF
- Build the microReticulumBridge with -DMICRORETICULUM_DIR pointing at
  this branch's deps/microReticulum
- Run the same deselect set we lock in reticulum-conformance/.github/
  workflows/microreticulum.yml so the two CI surfaces stay in sync

Locked baseline: 52 passing against the pyxis fork submodule
(feat/t-deck @ ca355e5). The conformance CI on the spike/graft branch
will report a different number once the graft progresses — that's the
intended signal.
2026-05-04 20:19:08 -04:00

173 lines
6.3 KiB
YAML

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pyxis-pytest:
name: Pyxis pytest suite (build_scripts + native)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install pytest
run: pip install pytest
- name: Run pytest
run: pytest tests/build_scripts tests/native -v
microreticulum-native:
name: microReticulum native unit tests (PlatformIO native17)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio-mrn-${{ hashFiles('deps/microReticulum/platformio.ini') }}
- name: Install PlatformIO
run: pip install --upgrade platformio
# microReticulum native17 vendors libbz2 sources but link_bz2.py
# links against system libbz2 — needs libbz2-dev on Ubuntu.
- name: Install libbz2-dev
run: sudo apt-get install -y libbz2-dev
# Run only suites that build cleanly under native17 in the fork.
# Erroring suites (test_ble, test_tdeck, test_lxmf, test_ratchets, etc.)
# are tracked separately — see pyxis MEMORY.md.
- name: Run native17 tests
working-directory: deps/microReticulum
run: |
pio test -e native17 -f test_os
pio test -e native17 -f test_bytes
pio test -e native17 -f test_msgpack
pio test -e native17 -f test_crypto
pio test -e native17 -f test_filesystem
pio test -e native17 -f test_objects
pio test -e native17 -f test_general
pio test -e native17 -f test_reference
pio test -e native17 -f test_example
pio test -e native17 -f test_collections
pio test -e native17 -f test_interop
python-interop:
# Hook equivalent to reticulum-kt's `:rns-test:test` and
# reticulum-swift's `Tests/ReticulumSwiftTests/Interop/` — every PR is
# gated on the microReticulum conformance bridge still producing
# byte-equivalent output to canonical Python RNS for the deselect-set
# locked in reticulum-conformance/.github/workflows/microreticulum.yml.
#
# Builds the bridge against THIS pyxis branch's submodule (so a
# submodule-pin bump in a PR is checked against python before merge,
# not after).
name: Python interop (microReticulum bridge vs Python RNS)
runs-on: ubuntu-latest
steps:
- name: Checkout pyxis
uses: actions/checkout@v4
with:
path: pyxis
submodules: recursive
- name: Checkout reticulum-conformance
uses: actions/checkout@v4
with:
repository: torlando-tech/reticulum-conformance
path: reticulum-conformance
- name: Checkout Reticulum (markqvist)
uses: actions/checkout@v4
with:
repository: markqvist/Reticulum
path: Reticulum
- name: Checkout LXMF (markqvist)
uses: actions/checkout@v4
with:
repository: markqvist/LXMF
path: LXMF
- name: Set up CMake
uses: lukka/get-cmake@v4.3.2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install pytest deps
working-directory: reticulum-conformance
run: pip install -r requirements.txt
- name: Configure bridge against THIS pyxis branch
working-directory: reticulum-conformance/impls/microreticulum
run: |
cmake -B build \
-DMICRORETICULUM_DIR=${{ github.workspace }}/pyxis/deps/microReticulum
- name: Build bridge
working-directory: reticulum-conformance/impls/microreticulum
run: cmake --build build --parallel
- name: Run conformance vs Python RNS
working-directory: reticulum-conformance
env:
CONFORMANCE_MICRORETICULUM_BRIDGE_CMD: ${{ github.workspace }}/reticulum-conformance/impls/microreticulum/build/microReticulumBridge
PYTHON_RNS_PATH: ${{ github.workspace }}/Reticulum
PYTHON_LXMF_PATH: ${{ github.workspace }}/LXMF
run: |
# Same deselect set as reticulum-conformance/.github/workflows/microreticulum.yml
pytest tests/ \
--impl microreticulum \
--ignore=tests/wire \
--ignore=tests/behavioral \
--ignore=tests/lxmf \
--ignore=tests/test_lxmf.py \
--ignore=tests/test_ratchet.py \
--ignore=tests/test_ratchet_lifecycle.py \
--ignore=tests/test_compression.py \
--ignore=tests/test_channel.py \
--deselect tests/test_crypto.py::test_hkdf_with_info \
--deselect tests/test_crypto.py::test_aes_encrypt_decrypt \
--deselect tests/test_identity.py::test_identity_encrypt_decrypt \
--deselect tests/test_token.py::test_token_cross_decrypt \
--deselect tests/test_announce.py::test_announce_pack_unpack \
--deselect tests/test_announce.py::test_announce_verify \
--deselect tests/test_link.py::test_link_encrypt_decrypt \
--deselect tests/test_link.py::test_link_request_pack_unpack \
--deselect tests/test_link.py::test_link_rtt_pack_unpack \
--deselect tests/test_transport.py::test_path_request_pack_unpack \
--deselect tests/test_transport.py::test_packet_hashlist_pack_unpack \
--deselect tests/test_ifac.py::test_ifac_mask_packet \
--deselect tests/test_transport.py::test_ifac_mask_packet \
--deselect tests/test_transport.py::test_ifac_unmask_packet \
--deselect tests/test_transport.py::test_ifac_cross_mask_unmask \
--deselect tests/test_transport.py::test_ifac_wrong_key_rejected \
--deselect tests/test_transport.py::test_ifac_mask_small_ifac_size \
-v