diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 613ae0617..cf26e34a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -188,6 +188,21 @@ jobs: run: | npx -y ajv-cli --spec=draft2020 validate --strict-schema=false -s schema.json -d "./examples/*.json" + docs: + name: ensure all examples are referenced from docs + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - name: Check examples usage + run: | + # diff <(grep -rh ExampleSnippet docs/* | grep -Eo "\d+.*\.json" | sort | uniq) <(ls -1 examples) + # if [ $? -ne 0 ]; then + # echo "The above example migrations are not referenced from the docs" + # exit 1 + # fi + grep -rh ExampleSnippet docs/* | grep -Eo "\d+.*\.json" + examples: name: 'examples (pg: ${{ matrix.pgVersion }}, schema: ${{ matrix.testSchema }})' runs-on: ubuntu-24.04