Migrated jsonschema.RefResolver to referencing.Registry #154
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JSON Schema Consistency Check | |
on: | |
workflow_dispatch: | |
pull_request: | |
# run these jobs when a PR is opened, reopened, or updated (synchronize) | |
# synchronize = commit(s) pushed to the pull request | |
types: | |
- opened | |
- reopened | |
- synchronize | |
paths: | |
- "dbt_semantic_interfaces/**" | |
jobs: | |
json-schema-consistency-check: | |
name: Schema Consistency Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check-out the repo | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: ./.github/actions/setup-python-env | |
with: | |
python-version: "3.9" | |
- name: Generate JSON Schema | |
run: hatch run dev-env:python dbt_semantic_interfaces/parsing/generate_json_schema_file.py | |
- name: Schema Consistency Check | |
run: | | |
if [[ $(git diff) ]] | |
then | |
git diff | |
echo 'Failure: JSON schema and generated schema do not match. Run make json_schema and commit the updated schema changes before merge.' | |
exit 1 | |
else | |
echo 'Success: JSON schema and generated schema match.' | |
fi |