feat: add mobile smoke tests and QR code for mobile URL (#2403)
* feat: add mobile smoke tests and QR code for mobile URL #2396: Add scripts/mobile-smoke.sh that launches the compiled binary on loopback ports and verifies the mobile surface through real HTTP requests: - Token auth (401/200, Bearer, query param, approval 404) - Insecure mode (no token required) - Binding warnings (0.0.0.0, LAN URL hint) Add mobile-smoke job to CI workflow. #2397: Add --qr flag to 'codewhale serve --mobile' that renders a terminal QR code for the mobile URL. Uses the LAN IP when available, falls back to 127.0.0.1. Adds qrcode crate (pure Rust, no C deps). * fix: address review feedback on mobile smoke tests - Fix Test Group 3 subprocess capture: use temp file instead of command substitution to avoid hanging and subshell variable isolation - Allow BINARY path to be overridden via BINARY env var - Add libdbus-1-dev system dependency to CI job for ubuntu build * fix: pass auth header in mobile smoke status helper * fix: send approval JSON in mobile smoke --------- Co-authored-by: Hu Qiantao <huqiantao@HudeMacBook-Air.local> Co-authored-by: Hunter B <hmbown@gmail.com>
This commit is contained in:
@@ -103,6 +103,27 @@ jobs:
|
||||
if: runner.os == 'Linux'
|
||||
run: echo "Linux npm wrapper smoke runs on CNB for mirrored first-party branches."
|
||||
|
||||
mobile-smoke:
|
||||
name: Mobile runtime smoke
|
||||
if: github.event_name != 'schedule'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install Linux system dependencies
|
||||
run: |
|
||||
for i in 1 2 3 4 5; do
|
||||
sudo apt-get update && break
|
||||
echo "apt-get update failed (attempt $i); retrying in 15s"
|
||||
sleep 15
|
||||
done
|
||||
sudo apt-get install -y libdbus-1-dev pkg-config
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-bin: false
|
||||
- name: Run mobile smoke tests
|
||||
run: ./scripts/mobile-smoke.sh
|
||||
|
||||
# Check documentation builds without warnings
|
||||
docs:
|
||||
name: Documentation
|
||||
|
||||
Reference in New Issue
Block a user