Skip to content

Create build-types.yml #3

Create build-types.yml

Create build-types.yml #3

Workflow file for this run

name: Test Type Generation from Schemas
on:
pull_request:
jobs:
build-pydantic:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
id: checkout_repository
uses: actions/checkout@v4
with:
sparse-checkout: schema
fetch-depth: 1
- name: Install datamodel-code-generator
id: install_code_generator
run: |
python -m venv ls-env
source ls-env/bin/activate
pip install datamodel-code-generator
- name: Generate Pydantic types
id: generate_pydantic_types
run: |
source ls-env/bin/activate
datamodel-codegen --input schema/ --input-file-type jsonschema --output GEN/ --use-default