build: prepare complete V1.2.1 runtime and Gitea regression workflow
Core regression / Python core and release configuration (push) Failing after 1m52s
Core regression / Python core and release configuration (push) Failing after 1m52s
This commit is contained in:
1 parent
344a2797b0
commit
cd9431985e
8 files changed
+99
-16
No files matched your search
@@ -0,0 +1,28 @@
|
||||
"""Catch missing runtime assets and mismatched version identity before release."""
|
||||
import ast
|
||||
from pathlib import Path
|
||||
import tomllib
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def test_release_version_matches_python_and_windows_resources():
|
||||
namespace = {}
|
||||
exec((ROOT / 'src/dx_productivity/trial_task_center/version.py').read_text(), namespace)
|
||||
version = namespace['VERSION']
|
||||
assert tomllib.loads((ROOT / 'pyproject.toml').read_text())['project']['version'] == version
|
||||
info = (ROOT / 'packaging/windows-version-info.txt').read_text()
|
||||
assert f"StringStruct('ProductVersion', '{version}')" in info
|
||||
parts = tuple(int(n) for n in version.split('.')) + (0,)
|
||||
assert f'filevers={parts}' in info and f'prodvers={parts}' in info
|
||||
|
||||
|
||||
def test_release_spec_includes_all_assets_and_complete_runtime():
|
||||
tree = ast.parse((ROOT / 'packaging/DxPartReplace.spec').read_text())
|
||||
constants = {node.value for node in ast.walk(tree) if isinstance(node, ast.Constant) and isinstance(node.value, str)}
|
||||
assert 'src/dx_productivity/trial_task_center/assets' in constants
|
||||
assert not any(isinstance(node, ast.Call) and isinstance(node.func, ast.Name)
|
||||
and node.func.id == 'stage_node_modules' for node in ast.walk(tree))
|
||||
assert {'dsh-runtime/node_modules', 'dsh-runtime/task-plugin',
|
||||
'issue-bootstrap.json', 'PySide6.QtWebEngineCore',
|
||||
'PySide6.QtWebEngineWidgets'} <= constants
|
||||
Reference in new issue
Block a user