Repository navigation
62 lines (51 loc) · 1.87 KB
/
Copy pathpython-tests.yml
File metadata and controls
62 lines (51 loc) · 1.87 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
name: Python tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Enforce repository and launcher policy
shell: python
run: |
from pathlib import Path
import re
tracked_bats = sorted(Path('.').rglob('*.bat'))
assert not tracked_bats, f"BAT files must stay out of Git: {tracked_bats}"
build = Path('BUILD.md').read_text(encoding='utf-8')
required = [
'setup_all.bat',
'run.bat',
'stop.bat',
'gdrive_setup.bat',
'Create Sonario Shortcut.bat',
]
for name in required:
assert f"### `{name}`" in build, f"BUILD.md is missing {name}"
ignore = Path('.gitignore').read_text(encoding='utf-8')
assert re.search(r'(?m)^\*\.bat\s*$', ignore), '.gitignore must block all BAT files'
assert not re.search(r'(?m)^!.*\.bat\s*$', ignore), 'BAT ignore exceptions are not allowed'
text = '\n'.join(
p.read_text(encoding='utf-8', errors='ignore')
for p in Path('.').rglob('*')
if p.is_file() and p.suffix.lower() not in {'.png', '.ico'}
).lower()
retired_names = ['llama' + ' 4 scout', 'llama' + '-4-scout']
for retired in retired_names:
assert retired not in text
assert 'qwen/qwen3.6-27b' in text
- name: Install test dependency
run: python -m pip install --disable-pip-version-check requests
- name: Compile Python source
run: python -m compileall -q .
- name: Run regression tests
run: python -m unittest discover -s tests -v