Skip to content

Commit

Permalink
Make CI check routing docs are up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
currycoder committed Sep 30, 2024
1 parent d2cc3fa commit e5936df
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,39 @@ jobs:
name: Check migrations are made
command: pipenv run ./manage.py makemigrations --check

check_routing_docs:
docker:
- <<: *image_python
- <<: *image_postgres
- <<: *image_opensearch_v1
working_directory: ~/lite-api
environment:
<<: *common_env_vars
LITE_API_ENABLE_ES: True
steps:
- setup
- run:
name: Migrate app
command: pipenv run ./manage.py migrate
- run:
name: Seed app
command: pipenv run ./manage.py seedall
- run:
name: Generate routing rules documentation
command: pipenv run ./manage.py generate_rules_docs
- run:
name: Check for routing documentation changes
command: |
cd lite_routing
CHANGED_FILES=$(git diff --name-only)
CHANGED_CONTENT=$(git diff)
if [[ "$CHANGED_FILES" == *"docs/"* ]]; then
echo "lite-routing docs are stale! They should be re-generated with manage.py generate_rules_docs and committed to the lite-routing repository."
echo "Changed files; $CHANGED_FILES"
echo "$CHANGED_CONTENT"
exit 1
fi
check_coverage:
working_directory: ~/lite-api
docker:
Expand Down Expand Up @@ -655,8 +688,12 @@ workflows:
- lite_routing_tests
- requires_transactions_tests
- check-lite-routing-sha
- check_routing_docs
- e2e_tests
- anonymised_db_dump_tests
- anonymised_db_dump_tests_dbt_platform
- requires_transactions_tests
- requires_transactions_tests_dbt_platform
check_routing_docs:
jobs:
- check_routing_docs

0 comments on commit e5936df

Please sign in to comment.