2021-04-30 11:19:21 +02:00
|
|
|
---
|
|
|
|
name: Validate models.yml and initial and example data
|
2020-09-19 20:53:44 +02:00
|
|
|
on: [push, pull_request]
|
2021-02-05 17:08:29 +01:00
|
|
|
env:
|
|
|
|
PYTHON_VERSION: 3.8.5
|
2021-05-01 11:15:03 +02:00
|
|
|
GO_VERSION: 1.16
|
2020-09-19 20:53:44 +02:00
|
|
|
jobs:
|
2021-02-05 17:08:29 +01:00
|
|
|
validate-models:
|
2020-09-19 20:53:44 +02:00
|
|
|
name: Validate models.yml
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-05-01 11:15:03 +02:00
|
|
|
- name: Set up Go
|
2020-09-19 20:53:44 +02:00
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
2021-04-30 11:19:21 +02:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2020-09-19 20:53:44 +02:00
|
|
|
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-11-11 12:02:23 +01:00
|
|
|
- name: Build validator
|
2021-01-06 11:32:16 +01:00
|
|
|
run: go build
|
2020-11-11 12:02:23 +01:00
|
|
|
working-directory: docs/modelsvalidator
|
|
|
|
env:
|
|
|
|
GO111MODULE: on
|
|
|
|
|
2020-09-19 20:53:44 +02:00
|
|
|
- name: Validate models.yml
|
2021-02-05 17:08:29 +01:00
|
|
|
run: docs/modelsvalidator/modelsvalidator docs/models.yml
|
|
|
|
|
|
|
|
validate-data:
|
|
|
|
name: Validate example-data.json and initial-data.json
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
|
|
|
|
- name: Install requirements
|
|
|
|
working-directory: docs/datavalidator
|
|
|
|
run: pip install -U -r requirements.txt
|
|
|
|
|
|
|
|
- name: Validate
|
|
|
|
working-directory: docs/datavalidator
|
|
|
|
run: python check_json.py
|