diff --git a/appveyor.yml b/appveyor.yml index 492e9f5d68df..758dddf5a065 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,35 +3,15 @@ image: Visual Studio 2022 hosts: petstore.swagger.io: 127.0.0.1 install: - - ps: | - Add-Type -AssemblyName System.IO.Compression.FileSystem - if (!(Test-Path -Path "C:\maven" )) { - (new-object System.Net.WebClient).DownloadFile( - 'https://archive.apache.org/dist/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.zip', - 'C:\maven-bin.zip' - ) - [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven") - } - # install gradle - - ps: | - Add-Type -AssemblyName System.IO.Compression.FileSystem - if (!(Test-Path -Path "C:\gradle\gradle-7.6" )) { - (new-object System.Net.WebClient).DownloadFile( - 'https://services.gradle.org/distributions/gradle-7.6-bin.zip', - 'C:\gradle-bin.zip' - ) - [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\gradle-bin.zip", "C:\gradle") - } - cmd: SET PATH=C:\maven\apache-maven-3.8.3\bin;C:\gradle\gradle-7.6\bin;%JAVA_HOME%\bin;%PATH% - cmd: SET MAVEN_OPTS=-Xmx4g - cmd: SET JAVA_OPTS=-Xmx4g - cmd: SET M2_HOME=C:\maven\apache-maven-3.8.3 - cmd: java -version - - cmd: gradle -v - cmd: dir/w - - git clone https://github.com/wing328/swagger-samples --depth 1 - - ps: Start-Process -FilePath 'C:\maven\apache-maven-3.8.3\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci" - - ps: Start-Sleep -s 15 + - cmd: docker pull swaggerapi/petstore + - cmd: docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore + - ps: Start-Sleep -s 120 - ps: $PSVersionTable.PSVersion - ps: Install-Module -Name Pester -Force -Scope CurrentUser build_script: @@ -70,10 +50,6 @@ build_script: # build C# .net standard 1.3+ API client #- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln #- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - # install openapi-generator locally - - mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error - # run the locally installed openapi-generator-gradle-plugin - - gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --stacktrace test_script: # test c# API client (multiple frameworks) - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCoreAndNet47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj @@ -83,7 +59,7 @@ test_script: - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-generichost-netstandard2.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test c# API client (netcore) - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj + #- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test C# API client (.net framework 4.7) - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-net47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test C# API client (.net framework 4.8)