Merge pull request #60 from MarShaikh/Solves-script/db_create-fails-#59 #309
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: Validate Models | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
validate_models: | |
name: Validate Models | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{runner.os}}-deploy-${{hashFiles('**/package-lock.json')}} | |
- run: npm ci | |
- run: | | |
npx ts-json-schema-generator -p lib/models.ts -t ModelMap -o schema.json | |
npx js-yaml models.yml > models.json | |
npx ajv validate -s schema.json -d models.json |