Skip to content

Update datasources script and list #536

Update datasources script and list

Update datasources script and list #536

Workflow file for this run

name: Syntax check
on:
push:
paths:
- '**.json'
- '**.schema'
- '**.yaml'
pull_request:
jobs:
syntaxcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: check valid json
run: |
echo "Checking valid json..."
shopt -s globstar
# check both json and schema file extensions
ls **/*.json >/dev/null && for j in **/*.json; do python -mjson.tool "$j" > /dev/null || (echo "INVALID $j" >&2; 1>foo ); done
ls **/*.schema >/dev/null && for j in **/*.schema; do python -mjson.tool "$j" > /dev/null || (echo "INVALID $j" >&2; 1>foo ); done
[[ ! -f "foo" ]]
- name: check valid yaml
run: |
echo "Checking valid yaml..." # even if no yaml is currently in repository
shopt -s globstar
ls **/*.yaml >/dev/null && for j in **/*.yaml; do python -c 'import yaml, sys; print(yaml.safe_load(sys.stdin))' < $j > /dev/null || (echo "INVALID $j" >&2; 1>foo1 ); done
[[ ! -f "foo1" ]]