name: "Magento Smoke Test" author: "Graycore" description: "Hits a running Magento instance with a basic page or GraphQL probe and asserts the response looks right." inputs: kind: description: "Which probe to run: `page` (GET / with title check) or `graphql` (POST /graphql with storeConfig query)." required: true host: description: "Host (and optional port) to probe. Defaults to `localhost`." required: false default: "localhost" timeout: description: "curl --max-time in seconds." required: false default: "60" runs: using: "composite" steps: - name: Validate kind shell: bash env: KIND: ${{ inputs.kind }} run: | case "$KIND" in page|graphql) ;; *) echo "FATAL: kind must be 'page' or 'graphql' (got '$KIND')"; exit 1 ;; esac - name: Smoke test page if: inputs.kind == 'page' shell: bash env: HOST: ${{ inputs.host }} TIMEOUT: ${{ inputs.timeout }} run: | status=$(curl -sS --max-time "$TIMEOUT" \ -o /tmp/smoke-page.html -w "%{http_code}" "http://$HOST/") if [ "$status" != "200" ]; then echo "Page returned HTTP $status" head -c 4000 /tmp/smoke-page.html exit 1 fi if ! grep -qE '