forked from loafle/openapi-generator-original
[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
This commit is contained in:
parent
19862f85e3
commit
63c8f5f965
16
appveyor.yml
16
appveyor.yml
@ -1,5 +1,3 @@
|
|||||||
# for CI with appveyor.yml
|
|
||||||
# Ref: https://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
|
|
||||||
version: '{branch}-{build}'
|
version: '{branch}-{build}'
|
||||||
image: Visual Studio 2017
|
image: Visual Studio 2017
|
||||||
hosts:
|
hosts:
|
||||||
@ -33,6 +31,8 @@ install:
|
|||||||
- cmd: dir/w
|
- cmd: dir/w
|
||||||
- git clone https://github.com/wing328/swagger-samples
|
- 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: 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:
|
build_script:
|
||||||
- dotnet --info
|
- dotnet --info
|
||||||
# build C# API client (netcore)
|
# build C# API client (netcore)
|
||||||
@ -67,7 +67,17 @@ test_script:
|
|||||||
|
|
||||||
# generate all petstore clients (openapi3)
|
# generate all petstore clients (openapi3)
|
||||||
- .\bin\openapi3\windows\run-all-petstore.cmd
|
- .\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:
|
cache:
|
||||||
- C:\maven\
|
- C:\maven\
|
||||||
- C:\gradle\
|
- C:\gradle\
|
||||||
|
@ -84,6 +84,7 @@ declare -a samples=(
|
|||||||
"${root}/bin/typescript-redux-query-petstore-with-npm-version.sh"
|
"${root}/bin/typescript-redux-query-petstore-with-npm-version.sh"
|
||||||
"${root}/bin/cpp-restsdk-petstore.sh"
|
"${root}/bin/cpp-restsdk-petstore.sh"
|
||||||
"${root}/bin/cpp-qt5-qhttpengine-server-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)
|
# Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user