Skip to content

Merge pull request #423 from calliope-project/overwrite-on-unzip #894

Merge pull request #423 from calliope-project/overwrite-on-unzip

Merge pull request #423 from calliope-project/overwrite-on-unzip #894

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