Guides
CI/CD Integration
Automate data quality and target leakage checks in your deployment pipelines
Data quality issues and target leakage often sneak into production because datasets are updated out-of-band or model retraining runs automatically. Featuresmith is designed to run inside CI/CD pipelines to prevent model degradation by gating deployments on strict rule audits.
Exit-Code Gating
The featuresmith analyze command returns deterministic exit codes that shell runners can check to decide whether to block or proceed with the build:
0: Clean run — no findings detected at or above the requested severity threshold.1: Rule violation(s) detected — one or more audits failed. This will automatically fail standard CI steps unless ignored.2: Invalid input — misspelled arguments, target column not in schema, or incorrect options.3: Ingestion/load failure — database or files could not be read or parsed.
GitHub Actions Workflow
Here is a complete, copy-pasteable GitHub Actions workflow file (.github/workflows/data-audit.yml) that runs Featuresmith on every pull request to check for schema drift and target leakage:
name: Data Quality Auditon: push: branches: [ main ] pull_request: branches: [ main ]jobs: audit-data: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 - name: Install Python & uv uses: astral-sh/setup-uv@v3 with: python-version: "3.11" - name: Install Featuresmith run: | uv pip install featuresmith-core featuresmith-cli --system - name: Run Data Quality Audit run: | # Gate pipeline on 'warning' and 'critical' severity levels featuresmith analyze data/train.csv --target churn --severity warningCustomizing Gates
You can customize the strictness of your CI gate by overriding severity settings in your local .featuresmith.yml configuration file, or by passing the --severity flag to the CLI.
# Only fail builds on critical violations (fully empty columns or target leakage)featuresmith analyze data/train.csv --target churn --severity critical