# NDPA 2023 / NDPC GAID 2025 compliance gate — generated by create-ndpr for {{ORG_NAME_COMMENT}}.
#
# Runs `ndpr audit` on every push and pull request. The audit scores your
# compliance config (consent, DSR, DPIA, breach, policy, lawful basis,
# cross-border, RoPA) plus your GAID 2025 DCPMI designation inputs, and exits
# non-zero when the overall score drops below the threshold — so a regression
# fails CI the same way a broken test would.
#
# Edit ndpr.audit.json to reflect your real posture, then raise --min-score
# over time as you close gaps. Docs: https://ndprtoolkit.com.ng/docs/guides/audit-cli
name: NDPA compliance audit

on:
  push:
    branches: [main]
  pull_request:

jobs:
  ndpr-audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      # The `ndpr` CLI ships with the toolkit. --no-save keeps it out of your
      # package.json if you don't already depend on it directly.
      - name: Install the NDPR toolkit (provides the `ndpr` CLI)
        run: npm install --no-save @tantainnovative/ndpr-toolkit@{{TOOLKIT_VERSION}}
      - name: Run the NDPA compliance audit
        run: npx ndpr audit --min-score 70
