mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-25 20:40:36 +03:00
23 lines
569 B
PowerShell
23 lines
569 B
PowerShell
# Run coverage analysis
|
|
|
|
$backend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\backend"
|
|
|
|
function RunCoverage() {
|
|
BackendCoverage
|
|
}
|
|
|
|
function BackendCoverage() {
|
|
Set-Location $backend
|
|
|
|
$coverageExec = "$backend\venv\Scripts\coverage.exe"
|
|
$djangoSrc = "$backend\manage.py"
|
|
$exclude = '*/venv/*,*/tests/*,*/migrations/*,*__init__.py,shared/*,manage.py,apps.py,urls.py,settings.py,admin.py'
|
|
|
|
& $coverageExec run --omit=$exclude $djangoSrc test
|
|
& $coverageExec report
|
|
& $coverageExec html
|
|
|
|
Start-Process "$backend\htmlcov\index.html"
|
|
}
|
|
|
|
RunCoverage |