when:
  - event: pull_request
    path:
      - "bin/disinto"
      - "lib/load-project.sh"
      - "lib/env.sh"
      - "lib/generators.sh"
      - "tests/**"
      - ".woodpecker/smoke-init.yml"

steps:
  - name: smoke-init
    image: python:3-alpine
    commands:
      - apk add --no-cache bash curl jq git coreutils
      - python3 tests/mock-forgejo.py & echo $! > /tmp/mock-forgejo.pid
      - sleep 2
      - bash tests/smoke-init.sh
      - kill $(cat /tmp/mock-forgejo.pid) 2>/dev/null || true
