mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Add -powershell and -Pester options to Start-PSPester
When testing containers, we want to use the in-box PowerShell.
This commit is contained in:
1 parent
03237e91b6
commit
e1e014295b
2 files changed
+6
-6
No files matched your search
+2
-2
@@ -27,13 +27,13 @@ for build in $BUILDS; do
|
||||
image="$build/$distro"
|
||||
if [[ "$TEST" -eq 1 ]]; then
|
||||
echo "Testing $image"
|
||||
command="cd PowerShell; Import-Module ./build.psm1; Install-Dotnet -NoSudo; Start-PSPester"
|
||||
command="cd PowerShell; Import-Module ./build.psm1; Install-Dotnet -NoSudo; Start-PSPester -powershell powershell -Pester ./src/Modules/Shared/Pester"
|
||||
# clone repo for stable images because it's not already done
|
||||
if [[ "$build" = stable ]]; then
|
||||
command="git clone --recursive https://github.com/$FORK/PowerShell -b $BRANCH; $command"
|
||||
fi
|
||||
# run Pester tests inside container
|
||||
docker run --rm -it powershell/powershell:$build-$distro powershell -c "$command"
|
||||
docker run --rm -it powershell/powershell:$build-$distro -c "$command"
|
||||
else
|
||||
echo "Building $image"
|
||||
# copy the common script because it lives outside the docker build context
|
||||
|
||||
Reference in new issue
Block a user