Skip to content

Commit

Permalink
Add docs job to the build workflow
Browse files Browse the repository at this point in the history
Add a job to check that all example migrations are referenced from the
documentation.
  • Loading branch information
andrew-farries committed Jan 18, 2025
1 parent c388bd3 commit f433698
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f433698

Please sign in to comment.