OpenSlides/.github/workflows/models.yml
Finn Stutzenstein cabba247f3
Reworked checker
Credits for initial work to @reiterl
2021-02-10 12:51:41 +01:00

46 lines
1.1 KiB
YAML

name: Validate models.yml
on: [push, pull_request]
env:
PYTHON_VERSION: 3.8.5
jobs:
validate-models:
name: Validate models.yml
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.15
- name: Check out code
uses: actions/checkout@v2
- name: Build validator
run: go build
working-directory: docs/modelsvalidator
env:
GO111MODULE: on
- name: Validate models.yml
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