mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-06 18:17:26 +08:00
added pipx and yamllint
This commit is contained in:
12
images/win/scripts/Installers/Install-Pipx-Packages.ps1
Normal file
12
images/win/scripts/Installers/Install-Pipx-Packages.ps1
Normal file
@@ -0,0 +1,12 @@
|
||||
$pipxToolset = (Get-ToolsetContent).pipx
|
||||
foreach($tool in $pipxToolset) {
|
||||
if ($tool.python) {
|
||||
$pythonPath = "${env:AGENT_TOOLSDIRECTORY}\Python\${tool.python}*\${env:AGENT_OSARCHITECTURE}\python-${tool.python}*"
|
||||
Write-Host "Install ${tool.package} into python ${tool.python}"
|
||||
pipx install $tool.package --python $python_path
|
||||
} else {
|
||||
Write-Host "Install ${tool.package} into default python"
|
||||
pipx install $tool.package
|
||||
}
|
||||
Invoke-PesterTests -TestFile "PipxPackages" -TestName $tool.package
|
||||
}
|
||||
14
images/win/scripts/Installers/Install-Pipx.ps1
Normal file
14
images/win/scripts/Installers/Install-Pipx.ps1
Normal file
@@ -0,0 +1,14 @@
|
||||
# Set custom directorys for pipx
|
||||
$env:PIPX_BIN_DIR = "${env:ProgramFiles(x86)}\pipx_bin"
|
||||
$env:PIPX_HOME = "${env:ProgramFiles(x86)}\pipx"
|
||||
|
||||
# Install pipx
|
||||
pip install pipx
|
||||
|
||||
# Set environment variables
|
||||
Add-MachinePathItem "${env:PIPX_BIN_DIR}"
|
||||
Set-SystemVariable -SystemVariable PIPX_BIN_DIR -Value $env:PIPX_BIN_DIR
|
||||
Set-SystemVariable -SystemVariable PIPX_HOME -Value $env:PIPX_HOME
|
||||
|
||||
# Test pipx
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Pipx"
|
||||
@@ -1,3 +0,0 @@
|
||||
pip install yamllint
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "yamllint"
|
||||
Reference in New Issue
Block a user