furtka/.forgejo/workflows/smoke-latest.yml
Daniel Maksymilian Syrnicki 1d75a165c4
All checks were successful
CI / lint (pull_request) Successful in 2m2s
CI / test (pull_request) Successful in 1m23s
CI / validate-json (pull_request) Successful in 58s
CI / markdown-links (pull_request) Successful in 26s
fix(ci): apk-install smoke prerequisites before running smoke-vm.sh
The Forgejo runner container is Alpine with a near-empty base — no
curl, python3, arp-scan, or sudo out of the box. scripts/smoke-vm.sh
needs all four:
  - curl: every PVE API call
  - python3: JSON parsing of PVE responses
  - arp-scan: MAC→IP discovery on the LAN (live ISO has no guest agent)
  - sudo: so the same script also works from a dev laptop as non-root

Without this step the smoke job fails immediately on "curl: not found",
regardless of whether the PVE secrets are correctly set.

Added to both build-iso.yml (inline smoke after ISO build) and
smoke-latest.yml (workflow_dispatch retest path).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 13:17:51 +02:00

47 lines
1.6 KiB
YAML

name: Smoke latest ISO
# Manual-trigger smoke test against the last ISO `build-iso.yml` produced.
# Use this when you've changed something that only affects smoke-vm.sh,
# the PVE setup, or the secrets — skips the 25-min ISO rebuild and only
# runs the ~2-min VM boot + /:5000 check.
#
# The ISO lives at /data/smoke-cache/latest.iso on the runner, populated
# by build-iso.yml's "Cache ISO for smoke-latest" step. That path is
# inside the runner's already-mounted /data volume, so no extra bind
# mounts needed.
on:
workflow_dispatch:
concurrency:
group: smoke-latest
cancel-in-progress: false
jobs:
smoke:
runs-on: self-hosted
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Check cached ISO exists
run: |
iso=/data/smoke-cache/latest.iso
if [ ! -f "$iso" ]; then
echo "::error::$iso not found — trigger build-iso.yml first to populate the cache."
exit 1
fi
echo "Will smoke: $iso"
ls -lh "$iso"
- name: Install smoke prerequisites
# Runner container is Alpine with a near-empty base; smoke-vm.sh
# needs curl, python3, arp-scan, and sudo (kept so the script
# also works when invoked from a dev laptop as a non-root user).
run: apk add --no-cache curl python3 arp-scan sudo
- name: Smoke-test ISO on Proxmox test host
env:
PVE_TEST_HOST: ${{ secrets.PVE_TEST_HOST }}
PVE_TEST_TOKEN: ${{ secrets.PVE_TEST_TOKEN }}
SMOKE_SHA: ${{ github.sha }}
run: ./scripts/smoke-vm.sh /data/smoke-cache/latest.iso