Skip to content

Commit fec88b3

Browse files
authored
Migrate tests from AppVeyor to GitHub workflow (#21982)
* migrate tests from appveyor to github workflow * test with dotnet 7 * test on windows * set dotnet version * Revert "set dotnet version" This reverts commit 87af6a6. * use localhost * update * update * update tets * update * remove appveyor
1 parent 0e1cba6 commit fec88b3

File tree

19 files changed

+2994
-178
lines changed

19 files changed

+2994
-178
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Samples C# .Net Client (Petstore)
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/**
7+
pull_request:
8+
paths:
9+
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/**
10+
jobs:
11+
build:
12+
name: Build clients
13+
runs-on: ubuntu-latest
14+
services:
15+
petstore-api:
16+
image: swaggerapi/petstore
17+
ports:
18+
- 80:8080
19+
env:
20+
SWAGGER_HOST: http://petstore.swagger.io
21+
SWAGGER_BASE_PATH: /v2
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
sample:
26+
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
27+
steps:
28+
- uses: actions/checkout@v5
29+
- uses: actions/[email protected]
30+
with:
31+
dotnet-version: '7.0.x'
32+
- name: Build
33+
working-directory: ${{ matrix.sample }}
34+
run: dotnet build Org.OpenAPITools.sln
35+
- name: Test
36+
working-directory: ${{ matrix.sample }}
37+
run: dotnet test Org.OpenAPITools.sln
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Samples C# .Net 7 Client
2+
3+
on:
4+
push:
5+
paths:
6+
# the .NET Core 3.0 runtime is no longer supported as it reached its end-of-life on March 3, 2020
7+
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/**
8+
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/**
9+
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/**
10+
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/**
11+
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/**
12+
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/**
13+
- samples/client/petstore/csharp/restsharp/net8/Petstore/**
14+
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/**
15+
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/**
16+
pull_request:
17+
paths:
18+
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/**
19+
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/**
20+
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/**
21+
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/**
22+
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/**
23+
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/**
24+
- samples/client/petstore/csharp/restsharp/net8/Petstore/**
25+
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/**
26+
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/**
27+
jobs:
28+
build:
29+
name: Build clients
30+
runs-on: windows-latest
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
sample:
35+
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/
36+
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/
37+
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/
38+
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/
39+
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
40+
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/
41+
- samples/client/petstore/csharp/restsharp/net8/Petstore/
42+
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/
43+
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
44+
steps:
45+
- uses: actions/checkout@v5
46+
- uses: actions/[email protected]
47+
with:
48+
dotnet-version: '7.0.x'
49+
- name: Build
50+
working-directory: ${{ matrix.sample }}
51+
run: dotnet build Org.OpenAPITools.sln
52+
- name: Test
53+
working-directory: ${{ matrix.sample }}
54+
run: dotnet test Org.OpenAPITools.sln

appveyor.yml

Lines changed: 0 additions & 113 deletions
This file was deleted.

bin/configs/csharp-restsharp-netstandard2.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
generatorName: csharp
33
library: restsharp
44
outputDir: samples/client/petstore/csharp/restsharp/standard2.0/Petstore
5-
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
5+
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types-localhost.yaml
66
templateDir: modules/openapi-generator/src/main/resources/csharp
77
additionalProperties:
88
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'

0 commit comments

Comments
 (0)