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:
|
2021-08-04 12:44:39 +02:00
|
|
|
PYTHON_VERSION: 3.9.6
|
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:
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-08-04 12:44:39 +02:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
|
|
|
|
- name: Install requirements
|
|
|
|
run: pip install -U -r docs/modelsvalidator/requirements.txt
|
2020-11-11 12:02:23 +01:00
|
|
|
|
2020-09-19 20:53:44 +02:00
|
|
|
- name: Validate models.yml
|
2021-08-04 12:44:39 +02:00
|
|
|
working-directory: docs/modelsvalidator
|
|
|
|
run: python validate.py
|
2021-02-05 17:08:29 +01:00
|
|
|
|
|
|
|
validate-data:
|
|
|
|
name: Validate example-data.json and initial-data.json
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-08-04 12:44:39 +02:00
|
|
|
- name: Checkout backend submodule
|
|
|
|
run: git submodule update --init openslides-backend/
|
|
|
|
|
2021-02-05 17:08:29 +01:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
|
|
|
|
- name: Install requirements
|
2021-08-04 12:44:39 +02:00
|
|
|
run: pip install -U -r openslides-backend/cli/requirements.txt
|
|
|
|
|
|
|
|
- name: set pythonpath
|
|
|
|
run: echo "PYTHONPATH=openslides-backend" >> $GITHUB_ENV
|
2021-02-05 17:08:29 +01:00
|
|
|
|
2021-08-04 12:44:39 +02:00
|
|
|
- name: Validate example-data.json
|
|
|
|
run: python openslides-backend/cli/check_json.py docs/example-data.json docker/initial-data.json
|