tests hotfix
tests / windows (push) Failing after 14m37s
tests / linux (push) Successful in 2m11s
tests / macos (push) Successful in 1m14s
tests / package-smoke-linux (push) Skipped
tests / package-smoke-windows (push) Skipped
tests / package-smoke-macos (push) Skipped

This commit is contained in:
galeon committed 2026-10-17 23:38:49 +03:00
1 parent 3ac2156ef2
commit acd9334c16
5 files changed
+34 -6

No files matched your search

+19 -2
View File
@@ -11,8 +11,10 @@
опустить планку, чтобы достигнутое не откатилось.
3. CHANGELOG.md содержит раздел для версии из project(BiLauncher VERSION …):
без него release.yml создаст релиз с пустым описанием (только предупреждение).
4. Скрипты .ps1 с не-ASCII символами сохранены в UTF-8 с BOM: без BOM Windows
PowerShell 5.1 читает их в ANSI-кодировке и падает на разборе кириллицы.
"""
import os, re, subprocess, sys
import glob, os, re, subprocess, sys
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
BASELINE = os.path.join(ROOT, "tests", "qmllint-baseline.txt")
@@ -75,12 +77,27 @@ def check_changelog():
return True
def check_ps1_bom():
step("Кодировка .ps1")
ok = True
for path in glob.glob(os.path.join(ROOT, "**", "*.ps1"), recursive=True):
if os.path.relpath(path, ROOT).startswith("build"): # папки сборки
continue
data = open(path, "rb").read()
if not data.startswith(b"\xef\xbb\xbf") and any(b > 0x7F for b in data):
print(f"ОШИБКА: {os.path.relpath(path, ROOT)} содержит не-ASCII, но сохранён без UTF-8 BOM")
ok = False
if ok:
print("все .ps1 читаются Windows PowerShell 5.1")
return ok
def main():
if len(sys.argv) != 2:
print(__doc__)
return 2
build_dir = os.path.abspath(sys.argv[1])
results = [check_translations(), check_qmllint(build_dir), check_changelog()]
results = [check_translations(), check_qmllint(build_dir), check_changelog(), check_ps1_bom()]
print("\nИТОГ:", "OK" if all(results) else "ЕСТЬ ОШИБКИ")
return 0 if all(results) else 1