Skip to content
Permalink
Browse files

[PowerShell] Test powershell petstore client in Appveyor (#5674)

* remove scala version in parent pom

* test ps petstore in appveyor

* fix command

* build and import

* fix import module

* fix import

* skip module import

* run multiple commands

* move to test script

* test ps exit

* fix exit

* check last status code

* clean tests

* exit last code

* add import

* change dir

* skip build failure

* fix check

* trigger build failure

* fail fast

* restore c# test

* new line comment

* add powershell exp to ensure up to date script
  • Loading branch information
wing328 committed Mar 24, 2020
1 parent 19862f8 commit 63c8f5f9658724af1dba4f14b0e839391ef80093
Showing with 14 additions and 3 deletions.
  1. +13 −3 appveyor.yml
  2. +1 −0 bin/utils/ensure-up-to-date
@@ -1,5 +1,3 @@
# for CI with appveyor.yml
# Ref: https://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
version: '{branch}-{build}'
image: Visual Studio 2017
hosts:
@@ -33,6 +31,8 @@ install:
- cmd: dir/w
- git clone https://github.com/wing328/swagger-samples
- ps: Start-Process -FilePath 'C:\maven\apache-maven-3.2.5\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
- ps: $PSVersionTable.PSVersion
- ps: Install-Module Pester -Force -Scope CurrentUser
build_script:
- dotnet --info
# build C# API client (netcore)
@@ -67,7 +67,17 @@ test_script:

# generate all petstore clients (openapi3)
- .\bin\openapi3\windows\run-all-petstore.cmd

# test ps pestore
- ps: |
$ErrorActionPreference = "Stop"
cd samples\client\petstore\powershell-experimental\
.\Build.ps1
Import-Module -Name '.\src\PSPetstore'
$Result = Invoke-Pester -PassThru
if ($Result.FailedCount -gt 0) {
$host.SetShouldExit($Result.FailedCount)
exit $Result.FailedCount
}
cache:
- C:\maven\
- C:\gradle\
@@ -84,6 +84,7 @@ declare -a samples=(
"${root}/bin/typescript-redux-query-petstore-with-npm-version.sh"
"${root}/bin/cpp-restsdk-petstore.sh"
"${root}/bin/cpp-qt5-qhttpengine-server-petstore.sh"
"${root}/bin/openapi3/powershell-experimental-petstore.sh"
)

# Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath)

0 comments on commit 63c8f5f

Please sign in to comment.
You can’t perform that action at this time.