Skip to content

Moving to Pydantic for yaml validation #314

Moving to Pydantic for yaml validation

Moving to Pydantic for yaml validation #314

Workflow file for this run

---
name: YAML Linter
on:
push:
pull_request:
paths:
- "yml/**"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check file extensions
run: |
files=$(find "$GITHUB_WORKSPACE/yml" -type f -not -name "*.yml");
if [[ $files ]]; then
echo "::errror::Files with unexpected extension found, please ensure you use '.yml' (all lower case) for files in the yml/ folder.";
for i in $files; do echo "::error file=$i,line=1::Unexpected extension"; done
exit 1;
fi
unset files
- name: Run YAML linter
uses: ibiqlik/action-yamllint@v3.1.0
with:
config_file: .github/.yamllint
- name: Run Pydantic validator
run: python3 .github/schema/pychecks.py "yml/**/*.yml"