From b9bf473dff5e8a70c439e4a7e8bbe2ba8470f502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jur=C4=8D=C3=A1k?= Date: Sat, 2 May 2026 11:57:54 +0200 Subject: [PATCH] ci: add opt-in dataset schema sync check Adds a Dataset Schema Sync Check step to the unitTest job that runs `npm run dataset-schema:check` only when the script is defined in the repo's package.json. Repos without the script silently skip the step, matching the opt-in-by-presence pattern already used for build-check, prettier, and knip/ts-unused-exports. --- .github/workflows/pr-build-test.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index aa7d273..490e936 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -134,3 +134,15 @@ jobs: else echo "knip nor ts-unused-exports are installed. Skipping unused exports check."; fi + + - name: Dataset Schema Sync Check + # Opt-in by presence: only repos that define a `dataset-schema:check` script in + # package.json run this. Keeps the workflow safe for consumers without the script. + run: | + HAS_SCHEMA_CHECK=$(jq -r '.scripts["dataset-schema:check"] // empty' package.json) + if [ -n "$HAS_SCHEMA_CHECK" ]; then + echo "dataset-schema:check script found. Running it."; + npm run dataset-schema:check; + else + echo "No dataset-schema:check script in package.json. Skipping."; + fi