Merge pull request #398 from calliope-project/fix-ehighways-renaming #826
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: Tests of YAML configuration and schema | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
jobs: | |
validate: | |
name: Validate configuration against a schema and validate the schema itself | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install jsonschema PyYAML | |
- name: Validate default config | |
run: python ./tests/validate_schema.py ./config/schema.yaml --config ./config/default.yaml | |
- name: Validate minimal config | |
run: python ./tests/validate_schema.py ./config/schema.yaml --config ./config/minimal.yaml | |
- name: Validate schema itself | |
run: python ./tests/validate_schema.py ./config/schema.yaml | |
- name: Validate test config | |
run: python ./tests/validate_schema.py ./tests/resources/schema.yaml --config ./tests/resources/test.yaml | |
- name: Validate test schema itself | |
run: python ./tests/validate_schema.py ./tests/resources/schema.yaml | |
# Modules | |
- name: Validate industry config | |
run: python ./tests/validate_schema.py ./modules/industry/schema.yaml --config ./modules/industry/config.yaml --level industry |