-
Notifications
You must be signed in to change notification settings - Fork 72
39 lines (35 loc) · 1.06 KB
/
entry-validation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
name: Entry Validation
on:
push:
branches:
- main
paths:
- "yml/**"
pull_request:
paths:
- "yml/**"
jobs:
linting-and-qc-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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.1
with:
config_file: .github/.yamllint
file_or_dir: yml/**/*.yml
- name: Run Pydantic validator
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r .github/schema/requirements.txt
python3 .github/schema/pychecks.py "yml/**/*.yml"