forked from wietze/HijackLibs
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1 KB
/
entry-validation.yml
File metadata and controls
37 lines (32 loc) · 1 KB
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
---
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: Install dependencies
run: |
python3 -m pip install --upgrade pip -r ".github/schema/requirements.txt"
- name: Run YAML linter
run: python3 -m yamllint -c ".github/config.yamllint" yml/
- name: Run Pydantic validator
run: python3 .github/schema/pychecks.py "yml/**/*.yml"