Files
dora-teleop/.gitea/workflows/validate.yml
T
cristhian 1b63ce97c9 validate the gamepad and robot dataflows in CI
Both pull sibling nodes by `git:`, but dora resolves the wiring without
fetching them, so this stays offline. It is what catches a drift between the
robot dataflow's output_types block and the tag it pins.

Also ignore `git/`, where dora build leaves those clones.
2026-09-16 12:18:57 -05:00

71 lines
2.2 KiB
YAML

# A pull request would otherwise run this twice on the same commit: once for the
# branch push and once for the PR.
name: validate
on:
push:
branches: [main]
pull_request:
env:
DORA_VERSION: v1.0.1
DORA_TARGET: x86_64-unknown-linux-gnu
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install the dora CLI
run: |
curl -fsSL -o dora-cli.tar.gz \
"https://github.com/dora-rs/dora/releases/download/${DORA_VERSION}/dora-cli-${DORA_TARGET}.tar.gz"
tar xzf dora-cli.tar.gz
mkdir -p "$HOME/.local/bin"
install -m 755 "dora-cli-${DORA_TARGET}/dora" "$HOME/.local/bin/dora"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
rm -rf dora-cli.tar.gz "dora-cli-${DORA_TARGET}"
- run: dora --version
# strict_types: true in the dataflow turns a type warning into a non-zero
# exit, so a mismatched annotation fails here rather than at runtime.
- name: Validate the dataflow
run: dora validate dataflow.yml
# The gamepad dataflow pulls dora-joy by `git:`, but validation resolves
# the wiring without fetching it, so this stays offline and still catches
# a mistyped port.
- name: Validate the gamepad dataflow
run: dora validate dataflow-gamepad.yml
# Same again for the real-arm stack. Its `output_types:` block is what
# lets this pass without an arm or a clone of the arm node, so a drift
# between it and the tag it pins fails here.
- name: Validate the robot dataflow
run: dora validate dataflow-robot.yml
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
# --locked fails if uv.lock is out of date with pyproject.toml, so a
# dependency change that was never locked cannot reach main.
- run: uv sync --locked --group dev
- run: uv run ruff check .
- run: uv run ruff format --check .
- run: uv run pytest -q
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: "*.md"