Run Great Expectations against a deliberate test batch in a GitHub Actions workflow triggered by pull_request, then make the validation command exit nonzero when a critical expectation fails. GitHub displays that failure as a workflow status on the pull request, giving reviewers a clear data-quality gate before merge. The YAML and Python below are an illustrative pattern, not a tested, drop-in integration: adapt them to your repository’s GX version, configuration, and data access.
How do I run Great Expectations in GitHub Actions?
Connect the pieces in this order: select the batch to validate, define the expectations for it, then invoke the validation from a repository-owned command in CI. GitHub Actions runs that command on a pull request; its exit status determines whether the step and job pass.
As an Amazon Associate I earn from qualifying purchases.
Understand the GX objects
- A Batch Definition identifies how a batch of data is selected.
- An Expectation Suite holds the checks you want to apply to that data.
- A Validation Definition connects an Expectation Suite to a Batch Definition.
- A Checkpoint runs Validation Definitions and can follow validation with Actions.
GX’s current Core documentation describes these relationships and how to run validations in its Validation Definitions documentation and validation guide. The repository’s command is the bridge between GX and GitHub: it loads the project configuration, runs the intended validation, and returns a failure status for failed critical checks.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsAdd a pull request workflow
Here is a minimal shape for the GitHub Actions side. Replace the illustrative script and dependency installation with the commands your project actually uses.
#1 Best Overall
name: Data quality
on:
pull_request:
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@<full-commit-sha>
- uses: actions/setup-python@<full-commit-sha>
with:
python-version: "<project-pinned-version>"
- run: pip install -r requirements.txt
- run: python scripts/validate_data.py
The placeholders in this example are values the repository owner must supply, not literal configuration. Pin third-party actions to full-length commit SHAs and give the workflow only the permissions it needs. GitHub documents workflows as jobs and steps that can run pull request builds and tests in its workflow overview; it also explains workflow security hardening.
The Python entry point should load the project’s GX configuration, execute the appropriate Checkpoint or Validation Definition, and exit unsuccessfully if a critical validation fails. The precise GX calls and result handling depend on the version and configuration in your repository; there is no universal command or YAML file that works unchanged across projects. Keep this command in version control so it is visible and reviewable with the rest of the pipeline.
Choose a batch that makes the result trustworthy
A pull request check is only useful if it validates the intended data. Prefer a representative, deterministic fixture or a safe staging batch whose selection is controlled. Avoid making every contributor’s pull request query mutable production data by accident: changing source data can make a check nondeterministic, and production access creates an unnecessary trust and exposure boundary.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When a Checkpoint runs, batch parameters select batches according to the Batch Definition in the Validation Definition. GX provides the validation mechanism, but it does not itself make remote access safe or configure GitHub secrets for you. If validation requires a remote dataset, decide how the workflow receives access, who can trigger it, and whether fork contributions should have that access before adding credentials.
Make failures useful without exposing private data
The required signal can be small: a passed or failed job with a concise reason. Do not print private rows, unexpected values, or sensitive diagnostics into logs that outside contributors can view. Put fuller reports in an access-controlled location if reviewers need them.
GX Checkpoint Actions can update Data Docs, send notifications, or run custom logic after validation. Use those follow-up actions to improve reviewer feedback, not to obscure the pass/fail gate. GX’s documentation covers Checkpoint Actions, including the available action patterns; configure visibility and access according to the data’s sensitivity.
Rank #4
Keep fork pull requests on the untrusted path
For validation that does not need secrets, use pull_request. GitHub says workflows triggered by fork-originated pull requests receive a read-only GITHUB_TOKEN and no other secrets by default. Repository settings and fork-workflow approval policies can affect whether a run starts. See GitHub’s guidance on securing GitHub Actions.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Do not use pull_request_target as a shortcut to gain secrets while checking out and running code supplied by a contributor. That event uses the base repository’s workflow context and can have privileged credentials; combining it with untrusted code can expose those credentials. If a separate privileged task is genuinely necessary, keep it separate from execution of contributor-controlled code and grant only the required token permissions.
Best Value
GitHub’s security guidance also recommends pinning actions to full commit SHAs, which it identifies as the only way to use an action as an immutable release. Review action code and access before adopting it. Its public-repository policy page states that a default block on pull_request_target for affected repositories is scheduled for enforcement on November 2, 2026; that date is future-dated relative to the page’s October 7, 2026 publication, so verify the current policy before relying on it: GitHub Actions security hardening.
Match GX and Python to the project
The current GX Core documentation surfaced for this article identifies version 1.23.2, and its Checkpoint-with-Actions procedure lists Python 3.10 through 3.14 as prerequisites. These are documentation details, not an independent compatibility test of every dependency combination. Check the current GX documentation alongside your project’s pinned Python version and lockfiles before changing CI.
Be careful with older examples: Great Expectations 0.18 documentation uses configuration patterns that should not be mixed casually with current Core APIs. Follow the docs for the version actually pinned by your project rather than copying an example with a similar-looking Checkpoint name.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




