diff --git a/.github/workflows/generate_other_formats.yaml b/.github/workflows/generate_other_formats.yaml index e10d1ac59..b4ed4569c 100644 --- a/.github/workflows/generate_other_formats.yaml +++ b/.github/workflows/generate_other_formats.yaml @@ -31,19 +31,21 @@ jobs: - name: Generate other model representations run: | cd linkml-schema - for file in *.yaml; - do name=`basename ${file} .yaml`; - echo "Processing $name file.."; - gen-json-schema ${file} > ../json-schema-autogen/${name}.json; - # generating jsonld context and removing generation_date field to avoid constant updates - gen-jsonld-context ${file} > ../jsonld-context-autogen/${name}.context.jsonld; - sed -i "/generation_date/d" ../jsonld-context-autogen/${name}.context.jsonld; - gen-pydantic --pydantic_version 2 ${file} > ../models_py-autogen/${name}.py; - if [ ${name} = "kbmodel" ]; then - echo "Creating and Fixing kbmodel diagram.."; - python ../utils/create_fix_kbmodel_diagram.py - else - gen-erdiagram ${file} > ../erdiagram-autogen/${name}.md; + for file in *.yaml; do + if [ "$file" != "bican_biolink.yaml" ]; then + name=`basename ${file} .yaml`; + echo "Processing $name file.."; + gen-json-schema ${file} > ../json-schema-autogen/${name}.json; + # generating jsonld context and removing generation_date field to avoid constant updates + gen-jsonld-context ${file} > ../jsonld-context-autogen/${name}.context.jsonld; + sed -i "/generation_date/d" ../jsonld-context-autogen/${name}.context.jsonld; + gen-pydantic --pydantic-version 2 ${file} > ../models_py-autogen/${name}.py; + if [ ${name} = "kbmodel" ]; then + echo "Creating and Fixing kbmodel diagram.."; + python ../utils/create_fix_kbmodel_diagram.py + else + gen-erdiagram ${file} > ../erdiagram-autogen/${name}.md; + fi fi done cd .. diff --git a/.github/workflows/test_other_formats.yaml b/.github/workflows/test_other_formats.yaml index 6ed344971..38bcd5805 100644 --- a/.github/workflows/test_other_formats.yaml +++ b/.github/workflows/test_other_formats.yaml @@ -2,11 +2,9 @@ name: test generating other formats on: push: - paths: - - 'linkml-schema/' + branches: + - main pull_request: - paths: - - 'linkml-schema/' jobs: test: @@ -32,17 +30,19 @@ jobs: - name: Generate other model representations run: | cd linkml-schema - for file in *.yaml; - do name=`basename ${file} .yaml`; - echo "Processing $name file.."; - # generating json schema - gen-json-schema ${file}; - # generating jsonld context - gen-jsonld-context ${file}; - # generating pydantic schema - gen-pydantic --pydantic_version 2 ${file}; - if [ ${name} != "kbmodel" ]; then - gen-erdiagram ${file}; + for file in *.yaml; do + if [ "$file" != "bican_biolink.yaml" ]; then + name=`basename ${file} .yaml`; + echo "Processing $name file.."; + # generating json schema + gen-json-schema ${file}; + # generating jsonld context + gen-jsonld-context ${file}; + # generating pydantic schema + gen-pydantic --pydantic-version 2 ${file}; + if [ ${name} != "kbmodel" ]; then + gen-erdiagram ${file}; + fi fi done cd .. diff --git a/.github/workflows/tests_lint.yaml b/.github/workflows/tests_lint.yaml index 10dd080b4..7f134e4b0 100644 --- a/.github/workflows/tests_lint.yaml +++ b/.github/workflows/tests_lint.yaml @@ -2,12 +2,9 @@ name: testing schemas with linkml-lint on: push: - paths: - - 'linkml-schema/' + branches: + - main pull_request: - paths: - - 'linkml-schema/' - jobs: test: diff --git a/.github/workflows/tests_models.yaml b/.github/workflows/tests_models.yaml index 496ea4c64..bada27637 100644 --- a/.github/workflows/tests_models.yaml +++ b/.github/workflows/tests_models.yaml @@ -2,12 +2,9 @@ name: testing schemas with python api on: push: - paths: - - 'linkml-schema/' + branches: + - main pull_request: - paths: - - 'linkml-schema/' - jobs: test: