Skip to content

Refresh TUI documentation and shortcuts #44

Refresh TUI documentation and shortcuts

Refresh TUI documentation and shortcuts #44

Workflow file for this run

name: tui-ci
# Scoped to apps/tui so the Rust toolchain only spins up when the terminal
# reader actually changes.
on:
push:
branches: [main, master]
paths:
- "apps/tui/**"
- ".github/workflows/tui-ci.yml"
- ".github/workflows/tui-release.yml"
pull_request:
paths:
- "apps/tui/**"
- ".github/workflows/tui-ci.yml"
- ".github/workflows/tui-release.yml"
env:
CARGO_TERM_COLOR: always
defaults:
run:
working-directory: apps/tui
jobs:
test:
name: test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-15, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- run: rustup update stable --no-self-update && rustup component add rustfmt clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: apps/tui
# The resident-worker tests use tiny fake MLX models, but exercise the
# real NumPy WAV conversion and Hugging Face disk-space preflight.
- name: Install worker test dependencies
run: |
python3 -m venv "${RUNNER_TEMP}/readio-worker-tests"
"${RUNNER_TEMP}/readio-worker-tests/bin/python" -m pip install \
--disable-pip-version-check \
"numpy>=1.26,<3" \
"huggingface_hub>=0.27,<2"
echo "${RUNNER_TEMP}/readio-worker-tests/bin" >> "${GITHUB_PATH}"
- name: Format
run: cargo fmt --check
- name: Lint
run: cargo clippy --all-targets -- -D warnings
- name: Test
run: cargo test --locked
# The interesting failures live in a real terminal: raw mode, the
# alternate screen, and whether the terminal is restored on exit.
- name: Terminal smoke test
run: |
cargo build --release --locked
python3 scripts/pty_probe.py 96 24 "wait:0.6,type:/sample,key:enter,wait:2" \
--home "${{ runner.temp }}/readio-ci" | tee /tmp/probe.txt
grep -q "\[exit: clean\]" /tmp/probe.txt
grep -q "\[alt-screen restored: True\]" /tmp/probe.txt
shell:
name: installer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Shellcheck
run: shellcheck --shell=sh scripts/install.sh
- name: Help works under dash
run: dash scripts/install.sh --help
portable:
name: release target (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Install Rust and musl tooling
run: |
rustup update stable --no-self-update
rustup target add ${{ matrix.target }}
sudo apt-get update
sudo apt-get install -y musl-tools
- uses: Swatinem/rust-cache@v2
with:
workspaces: apps/tui
key: ${{ matrix.target }}
- name: Build the release target
run: cargo build --release --locked --target ${{ matrix.target }}