# .woodpecker/smoke-init.yml — Smoke test for disinto init using mock Forgejo # # Runs on PRs that touch init-related files: # - bin/disinto (the init code) # - lib/load-project.sh, lib/env.sh (init dependencies) # - tests/** (test changes) # - .woodpecker/smoke-init.yml (pipeline changes) # # Uses mock Forgejo server (starts in <1s) instead of real Forgejo. # Total runtime target: <10 seconds. # # Pipeline steps: # 1. Start mock-forgejo.py (instant startup) # 2. Run smoke-init.sh which: # - Runs disinto init against mock # - Verifies users, repos, labels created via API # - Verifies .env tokens, TOML generated, cron installed # - Queries /mock/state endpoint to verify all API calls made when: - event: pull_request path: - "bin/disinto" - "lib/load-project.sh" - "lib/env.sh" - "tests/smoke-init.sh" - "tests/mock-forgejo.py" - ".woodpecker/smoke-init.yml" steps: - name: smoke-init image: python:3-alpine commands: - apk add --no-cache bash curl jq git - MOCK_FORGE_PORT=3001 python3 tests/mock-forgejo.py & # Wait for mock to be ready - for i in $(seq 1 30); do curl -sf http://localhost:3001/api/v1/version >/dev/null 2>&1 && break || sleep 1; done - SMOKE_FORGE_URL=http://localhost:3001 bash tests/smoke-init.sh