Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build-types.yml #206

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test Type Generation from Schemas

on:
pull_request:
paths:
- schema/

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
Loading