Skip to content

fixes issue #74 and #75 #131

fixes issue #74 and #75

fixes issue #74 and #75 #131

name: validate_problem_instance_json
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events for main branch
# also runs nightly as a cron job
push:
branches: [ main ]
pull_request:
branches: [ main ]
# schedule:
# - cron: '0 0 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
validate_problem_instance_json:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
- name: setup dependencies
run: |
pip3 install jsonschema
- name: Run the Python Script that will validate the problem_instance JSON schema
working-directory: ./scripts
run: |
date > problem_instance_json_schema_validation_log.txt
python3 validate_schema.py -i ../problem_instances -e ../json_files_with_errors >> problem_instance_json_schema_validation_log.txt 2>&1
- name: commit changes
run: |
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
git add -A
git commit -m "Automatic problem_instance JSON Schema Validation"
git push
# git push origin