Skip to content

MAJ des infos sur V&T #170

MAJ des infos sur V&T

MAJ des infos sur V&T #170

Workflow file for this run

name: Vérification du respect des spécifications
on:
push:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# AJV does not consider the geojson external schema, but the errors are more detailed
# so I put both validator,
- name: Validate JSON with AVJ.
uses: docker://orrosenblatt/validate-json-action:latest
env:
INPUT_SCHEMA: schema_amenagements_cyclables.json
INPUT_JSONS: exemple-valide.json
# Install a python cli checker, `jsonschema` that have poor errors but can check that the example is a valid geojson
# (unlike ajv it resolves the external geojson schema)
- name: Installation Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Installation des dépendances
run: pip install -r requirements.txt
- name: Vérification du schéma et des fichiers d'exemples
run: |
jsonschema --instance exemple-valide.json schema_amenagements_cyclables.json