9 lines
1.2 KiB
Python
9 lines
1.2 KiB
Python
from pathlib import Path
|
|
import subprocess,json
|
|
out=Path(__file__).resolve().parent;qa=Path('C:/Users/macbook/.config/investmoz/parques-integral-QA-20261018/source');node='C:/Users/macbook/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node.exe';php='C:/laragon/bin/php/php-8.5.11-Win32-vs17-x64/php.exe';checks={}
|
|
tasks=[('PHP-new',[php,'-l',str(qa/'app/Services/InvestmentZoneIntegralDetails.php')]),('PHP-integration',[php,'-l',str(qa/'app/Services/InvestmentZoneOperationalDetails.php')]),('LINT',[node,str(qa/'node_modules/vite-plus/bin/vp'),'check','--fix','resources/js/components/investment-zone-integral-details.tsx','resources/js/components/investment-zone-operational-details.tsx','resources/js/pages/investment/zone.tsx']),('TYPES',[node,str(qa/'node_modules/typescript/bin/tsc'),'--noEmit']),('BUILD',[node,str(qa/'node_modules/vite/bin/vite.js'),'build'])]
|
|
for name,args in tasks:
|
|
p=subprocess.run(args,cwd=qa,capture_output=True,timeout=180);(out/(name+'.log')).write_bytes(p.stdout+p.stderr);checks[name]=p.returncode==0
|
|
if p.returncode:print(json.dumps(checks));raise RuntimeError(name+' failed; see log')
|
|
(out/'BUILD-CHECKS.json').write_text(json.dumps(checks,indent=2),'utf-8');print(json.dumps(checks))
|