30 lines
1.1 KiB
PowerShell
30 lines
1.1 KiB
PowerShell
|
|
# Check for and install missing dependencies
|
||
|
|
$requirementsFile = "requirements.txt"
|
||
|
|
|
||
|
|
if (Test-Path $requirementsFile) {
|
||
|
|
Write-Output "Checking for dependencies in $requirementsFile ..."
|
||
|
|
$dependencies = Get-Content $requirementsFile
|
||
|
|
foreach ($dependency in $dependencies) {
|
||
|
|
$packageName = $dependency -split "==")[0]
|
||
|
|
if (-not (pip show $packageName)) {
|
||
|
|
Write-Output "Installing missing dependency: $packageName ..."
|
||
|
|
pip install $dependency
|
||
|
|
} else {
|
||
|
|
Write-Output "Dependency $packageName is already installed."
|
||
|
|
}
|
||
|
|
}
|
||
|
|
Write-Output "All dependencies are checked and installed."
|
||
|
|
} else {
|
||
|
|
Write-Output "Requirements file $requirementsFile not found. Skipping dependency checks."
|
||
|
|
}
|
||
|
|
|
||
|
|
# Navigate to the tests directory and run tests
|
||
|
|
$testsDirectory = "tests/claude"
|
||
|
|
if (Test-Path $testsDirectory) {
|
||
|
|
Write-Output "Running tests in $testsDirectory ..."
|
||
|
|
Push-Location $testsDirectory
|
||
|
|
python -m unittest discover
|
||
|
|
Pop-Location
|
||
|
|
} else {
|
||
|
|
Write-Output "Tests directory $testsDirectory not found."
|
||
|
|
}
|