Documentation version: next — development documentation
Skip to content

GitHub Actions coverage recipe

Register the PHPUnit extension with output_file and enable the GitHub Step Summary:

xml
<parameter name="output_file" value="build/openapi-coverage.md"/>
<parameter name="github_step_summary" value="true"/>

Then preserve the same report as a workflow artifact:

yaml
- name: Run contract tests
  run: vendor/bin/phpunit

- name: Upload OpenAPI coverage
  if: always()
  uses: actions/upload-artifact@v4
  with:
    name: openapi-coverage
    path: build/openapi-coverage.md

GitHub renders the summary on the workflow run page while the artifact remains downloadable. Add a coverage threshold when missing operations should fail CI.

Released under the MIT License.