Skip to content

Commit

Permalink
[C#] Add C# Petstore test to AppVeyor (#3489)
Browse files Browse the repository at this point in the history
* update appveyor.yml to test c# petstore client

* update csproj file

* add docker version test

* add docker version

* add docker

* add cpuid.ps1

* comment out cpuid

* use start process

* remove mvn test

* remove comments related to docker

* fix appveyor to run local petstore, shippable caching turned on

* add comments to ci config

* remove cpuid.ps1

* update C# petstore sample
  • Loading branch information
wing328 authored Jul 31, 2016
1 parent 75cd4bf commit 3d7ff26
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 69 deletions.
11 changes: 10 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# for CI with appveyor.yml
# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
version: '{build}'
version: '{branch}-{build}'
os: Windows Server 2012
hosts:
petstore.swagger.io: 127.0.0.1
install:
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
Expand All @@ -15,9 +17,16 @@ install:
- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;%PATH%
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
- 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"
build_script:
- nuget restore samples\client\petstore\csharp\SwaggerClient\IO.Swagger.sln
- msbuild samples\client\petstore\csharp\SwaggerClient\IO.Swagger.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- mvn clean install --batch-mode
test_script:
# test c# API client
- nunit-console samples\client\petstore\csharp\SwaggerClient\src\IO.Swagger.Test\bin\Debug\IO.Swagger.Test.dll --result=myresults.xml;format=AppVeyor
# generate all petstore clients
- .\bin\windows\run-all-petstore.cmd
cache:
- C:\maven\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,39 +147,39 @@ UpgradeLog*.htm
*.swp
*.swo

# svn
.svn
# svn
.svn

# SQL Server files
**/App_Data/*.mdf
**/App_Data/*.ldf
**/App_Data/*.sdf
# SQL Server files
**/App_Data/*.mdf
**/App_Data/*.ldf
**/App_Data/*.sdf


#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# =========================
# Windows detritus
# =========================
# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini
# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/
# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac desktop service store files
.DS_Store
# Mac desktop service store files
.DS_Store

# SASS Compiler cache
.sass-cache
# SASS Compiler cache
.sass-cache

# Visual Studio 2014 CTP
**/*.sln.ide
# Visual Studio 2014 CTP
**/*.sln.ide
52 changes: 26 additions & 26 deletions samples/client/petstore/csharp/SwaggerClient/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,39 +147,39 @@ UpgradeLog*.htm
*.swp
*.swo

# svn
.svn
# svn
.svn

# SQL Server files
**/App_Data/*.mdf
**/App_Data/*.ldf
**/App_Data/*.sdf
# SQL Server files
**/App_Data/*.mdf
**/App_Data/*.ldf
**/App_Data/*.sdf


#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# =========================
# Windows detritus
# =========================
# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini
# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/
# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac desktop service store files
.DS_Store
# Mac desktop service store files
.DS_Store

# SASS Compiler cache
.sass-cache
# SASS Compiler cache
.sass-cache

# Visual Studio 2014 CTP
**/*.sln.ide
# Visual Studio 2014 CTP
**/*.sln.ide
10 changes: 5 additions & 5 deletions samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Release|Any CPU.Build.0 = Release|Any CPU
{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/csharp/SwaggerClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c

- API version: 1.0.0
- SDK version: 1.0.0
- Build date: 2016-07-26T14:25:16.509+08:00
- Build date: 2016-07-31T22:04:18.446+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen

## Frameworks supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0
Contact: [email protected]
Expand Down Expand Up @@ -71,10 +71,10 @@ limitations under the License.
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand All @@ -86,7 +86,7 @@ limitations under the License.
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
<Project>{85AE8212-9819-4224-A9E5-B93419EC927B}</Project>
<Project>{1230F4B8-71F8-4A8C-966F-2E10106EA239}</Project>
<Name>IO.Swagger</Name>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ limitations under the License.
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}</ProjectGuid>
<ProjectGuid>{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IO.Swagger</RootNamespace>
Expand Down
8 changes: 5 additions & 3 deletions shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ language: java
jdk:
- openjdk7
- openjdk8
- oraclejdk7
- oraclejdk8

build:
cache: true
cache_dir_list:
- $HOME/.m2
ci:
- ./bin/run-all-petstore > run-all-petstore.log 2>&1
# generate all petstore sampless (client, servers, doc)
- ./bin/run-all-petstore 2>&1 > run-all-petstore.log
post_ci:
- tail run-all-petstore.log

0 comments on commit 3d7ff26

Please sign in to comment.