Repository navigation
69 lines (64 loc) · 1.82 KB
/
Copy pathvalidate.yml
File metadata and controls
69 lines (64 loc) · 1.82 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Validate
on:
push:
branches: ["**"]
pull_request:
permissions:
contents: read
jobs:
examples:
name: Examples parse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install pyyaml
- name: Parse every example
run: |
python - <<'PY'
import glob, sys, yaml
failed = False
for f in sorted(glob.glob("examples/*.yaml")):
try:
yaml.safe_load(open(f))
print(f"ok {f}")
except yaml.YAMLError as e:
failed = True
print(f"FAIL {f}\n{e}")
sys.exit(1 if failed else 0)
PY
issue-forms:
name: Issue forms parse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install pyyaml
- name: Parse issue forms and label definitions
run: |
python - <<'PY'
import glob, sys, yaml
failed = False
for f in sorted(glob.glob(".github/ISSUE_TEMPLATE/*.yml")) + [".github/labels.yml"]:
try:
yaml.safe_load(open(f))
print(f"ok {f}")
except yaml.YAMLError as e:
failed = True
print(f"FAIL {f}\n{e}")
sys.exit(1 if failed else 0)
PY
appendix-drift:
name: Appendix A matches the body
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Check every field in the body appears in Appendix A
run: python3 scripts/check_appendix.py