# Pull request check

> A pull request check is an automated test that runs when code is proposed for merging and reports pass or fail on the pull request.

A pull request check is an automated test that runs when code is proposed for merging and reports pass or fail on the pull request. Teams make checks required, so nothing merges until they pass.

For example, an engineer opens a pull request that changes the SQL of a gold table. Within minutes, the pull request shows its checks: lint passed, unit tests passed, golden tests failed with a diff showing that one region's revenue changed from 120,400 to 118,950, and a cost estimate. Because the golden test check is required, the pull request cannot be merged until the engineer either fixes the SQL or updates the expected output, and an updated expected output shows up in the pull request for a reviewer to approve.

On GitHub, checks are reported by workflows or apps, and branch protection rules decide which ones must pass before a merge. A check should be fast, so people wait for it rather than work around it, and deterministic, so a failure means something. Checks that need credentials for a data platform must be designed so that a pull request from an untrusted branch cannot read them.

Data pipelines benefit from checks more than most code, because a wrong result often looks plausible and nobody notices until a report is questioned. See also [data quality test](https://emolysis.com/glossary/data-quality-test), [Databricks Asset Bundle](https://emolysis.com/glossary/asset-bundle) and the [integrations](https://emolysis.com/integrations) page.

Checks also make review easier. Instead of reading every line of a SQL change and guessing what it does to the numbers, a reviewer can read the diff of the expected outputs, which shows the effect of the change on real cases. A pull request whose checks all pass is not proven correct, but it is much less likely to break a report. See also [golden test](https://emolysis.com/glossary/golden-test).

Emolysis's planned GitHub App runs four checks on pipeline changes: lint for your platform, [golden tests](https://emolysis.com/glossary/golden-test) on DuckDB, a cost estimate and a preview dashboard. A reusable GitHub Actions workflow, in preview, runs `emo check` in your own CI for the first three; it needs the emo command line, which is not released yet. See [GitHub checks](https://emolysis.com/docs/github-checks). A check that cannot be skipped is only as good as its tests, which is why the fixtures committed with the code matter.

---

Page: https://emolysis.com/glossary/pull-request-check. Emolysis is a product of Bandpey GmbH, Munich, Germany. It is in private development, and nothing is released yet.
