Smoke Tests #4536
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Smoke Tests | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- '**/*' | |
- '!.github/workflows/smoke-tests.yml' | |
- '!src/CLI/ApiClientCodeGen.CLI/**/*' | |
- '!src/Core/ApiClientCodeGen.Core/**/*' | |
- '!src/VSIX/ApiClientCodeGen.Vsix.Shared/**/*' | |
- '!test/GeneratedCode/**/*.csproj' | |
- '!test/OpenAPI/**/Swagger.*' | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
schedule: | |
- cron: '0 8 * * *' | |
jobs: | |
CSharp: | |
strategy: | |
fail-fast: false | |
matrix: | |
format: [ json, yaml ] | |
version: [ V2, V3 ] | |
os: [ macos-latest, windows-latest, ubuntu-latest ] | |
name: C# | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Setup .NET versions | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
2.1.x | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
8.0.x | |
9.0.x | |
- name: Prepare Swagger Petstore OpenAPI Spec | |
run: cp ./OpenAPI/${{ matrix.version }}/Swagger.${{ matrix.format }} ./OpenApi.${{ matrix.format }} | |
working-directory: test | |
- name: Generate code with NSwag | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v csharp nswag ./OpenApi.${{ matrix.format }} GeneratedCode ./GeneratedCode/NSwag/Output.cs --no-logging | |
cp ./GeneratedCode/NSwag/Output.cs ./GeneratedCode/NSwag/Net6/Output.cs | |
cp ./GeneratedCode/NSwag/Output.cs ./GeneratedCode/NSwag/Net7/Output.cs | |
cp ./GeneratedCode/NSwag/Output.cs ./GeneratedCode/NSwag/Net48/Output.cs | |
cp ./GeneratedCode/NSwag/Output.cs ./GeneratedCode/NSwag/Net472/Output.cs | |
cp ./GeneratedCode/NSwag/Output.cs ./GeneratedCode/NSwag/Net462/Output.cs | |
cp ./GeneratedCode/NSwag/Output.cs ./GeneratedCode/NSwag/Net481/Output.cs | |
cp ./GeneratedCode/NSwag/Output.cs ./GeneratedCode/NSwag/NetStandard20/Output.cs | |
cp ./GeneratedCode/NSwag/Output.cs ./GeneratedCode/NSwag/NetStandard21/Output.cs | |
working-directory: test | |
- name: Build .NET 6 NSwag generated code | |
run: dotnet build ./GeneratedCode/NSwag/Net6/Net6.csproj | |
working-directory: test | |
- name: Build .NET 7 NSwag generated code | |
run: dotnet build ./GeneratedCode/NSwag/Net7/Net7.csproj | |
working-directory: test | |
- name: Build .NET 4.8.1 NSwag generated code | |
run: dotnet build ./GeneratedCode/NSwag/Net481/Net481.csproj | |
if: ${{ matrix.os == 'windows-2022' }} | |
working-directory: test | |
- name: Build .NET 4.8 NSwag generated code | |
run: dotnet build ./GeneratedCode/NSwag/Net48/Net48.csproj | |
working-directory: test | |
- name: Build .NET 4.7.2 NSwag generated code | |
run: dotnet build ./GeneratedCode/NSwag/Net472/Net472.csproj | |
working-directory: test | |
- name: Build .NET 4.6.2 NSwag generated code | |
run: dotnet build ./GeneratedCode/NSwag/Net462/Net462.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.0 NSwag generated code | |
run: dotnet build ./GeneratedCode/NSwag/NetStandard20/NetStandard20.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.1 NSwag generated code | |
run: dotnet build ./GeneratedCode/NSwag/NetStandard21/NetStandard21.csproj | |
working-directory: test | |
- name: Generate code with OpenAPI Generator | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v csharp openapi ./OpenApi.${{ matrix.format }} GeneratedCode ./GeneratedCode/OpenApiGenerator/Output.cs --no-logging | |
cp ./GeneratedCode/OpenApiGenerator/Output.cs ./GeneratedCode/OpenApiGenerator/Net6/Output.cs | |
cp ./GeneratedCode/OpenApiGenerator/Output.cs ./GeneratedCode/OpenApiGenerator/Net7/Output.cs | |
cp ./GeneratedCode/OpenApiGenerator/Output.cs ./GeneratedCode/OpenApiGenerator/Net48/Output.cs | |
cp ./GeneratedCode/OpenApiGenerator/Output.cs ./GeneratedCode/OpenApiGenerator/Net472/Output.cs | |
cp ./GeneratedCode/OpenApiGenerator/Output.cs ./GeneratedCode/OpenApiGenerator/Net462/Output.cs | |
cp ./GeneratedCode/OpenApiGenerator/Output.cs ./GeneratedCode/OpenApiGenerator/Net481/Output.cs | |
cp ./GeneratedCode/OpenApiGenerator/Output.cs ./GeneratedCode/OpenApiGenerator/NetStandard20/Output.cs | |
cp ./GeneratedCode/OpenApiGenerator/Output.cs ./GeneratedCode/OpenApiGenerator/NetStandard21/Output.cs | |
working-directory: test | |
- name: Build .NET 6 OpenAPI Generator generated code | |
run: dotnet build ./GeneratedCode/OpenApiGenerator/Net6/Net6.csproj | |
working-directory: test | |
- name: Build .NET 7 OpenAPI Generator generated code | |
run: dotnet build ./GeneratedCode/OpenApiGenerator/Net7/Net7.csproj | |
working-directory: test | |
- name: Build .NET 4.8.1 OpenAPI Generator generated code | |
run: dotnet build ./GeneratedCode/OpenApiGenerator/Net481/Net481.csproj | |
if: ${{ matrix.os == 'windows-2022' }} | |
working-directory: test | |
- name: Build .NET 4.8 OpenAPI Generator generated code | |
run: dotnet build ./GeneratedCode/OpenApiGenerator/Net48/Net48.csproj | |
working-directory: test | |
- name: Build .NET 4.7.2 OpenAPI Generator generated code | |
run: dotnet build ./GeneratedCode/OpenApiGenerator/Net472/Net472.csproj | |
working-directory: test | |
- name: Build .NET 4.6.2 OpenAPI Generator generated code | |
run: dotnet build ./GeneratedCode/OpenApiGenerator/Net462/Net462.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.0 OpenAPI Generator generated code | |
run: dotnet build ./GeneratedCode/OpenApiGenerator/NetStandard20/NetStandard20.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.1 OpenAPI Generator generated code | |
run: dotnet build ./GeneratedCode/OpenApiGenerator/NetStandard21/NetStandard21.csproj | |
working-directory: test | |
- name: Generate code with Swagger Codegen CLI | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v csharp swagger ./OpenApi.${{ matrix.format }} GeneratedCode ./GeneratedCode/SwaggerCodegen/Output.cs --no-logging | |
cp ./GeneratedCode/SwaggerCodegen/Output.cs ./GeneratedCode/SwaggerCodegen/Net6/Output.cs | |
cp ./GeneratedCode/SwaggerCodegen/Output.cs ./GeneratedCode/SwaggerCodegen/Net7/Output.cs | |
cp ./GeneratedCode/SwaggerCodegen/Output.cs ./GeneratedCode/SwaggerCodegen/Net48/Output.cs | |
cp ./GeneratedCode/SwaggerCodegen/Output.cs ./GeneratedCode/SwaggerCodegen/Net472/Output.cs | |
cp ./GeneratedCode/SwaggerCodegen/Output.cs ./GeneratedCode/SwaggerCodegen/Net462/Output.cs | |
cp ./GeneratedCode/SwaggerCodegen/Output.cs ./GeneratedCode/SwaggerCodegen/Net481/Output.cs | |
cp ./GeneratedCode/SwaggerCodegen/Output.cs ./GeneratedCode/SwaggerCodegen/NetStandard20/Output.cs | |
cp ./GeneratedCode/SwaggerCodegen/Output.cs ./GeneratedCode/SwaggerCodegen/NetStandard21/Output.cs | |
working-directory: test | |
- name: Build .NET 6 Swagger Codegen CLI generated code | |
run: dotnet build ./GeneratedCode/SwaggerCodegen/Net6/Net6.csproj | |
working-directory: test | |
- name: Build .NET 7 Swagger Codegen CLI generated code | |
run: dotnet build ./GeneratedCode/SwaggerCodegen/Net7/Net7.csproj | |
working-directory: test | |
- name: Build .NET 4.8.1 Swagger Codegen CLI generated code | |
run: dotnet build ./GeneratedCode/SwaggerCodegen/Net481/Net481.csproj | |
if: ${{ matrix.os == 'windows-2022' }} | |
working-directory: test | |
- name: Build .NET 4.8 Swagger Codegen CLI generated code | |
run: dotnet build ./GeneratedCode/SwaggerCodegen/Net48/Net48.csproj | |
working-directory: test | |
- name: Build .NET 4.7.2 Swagger Codegen CLI generated code | |
run: dotnet build ./GeneratedCode/SwaggerCodegen/Net472/Net472.csproj | |
working-directory: test | |
- name: Build .NET 4.6.2 Swagger Codegen CLI generated code | |
run: dotnet build ./GeneratedCode/SwaggerCodegen/Net462/Net462.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.0 Swagger Codegen CLI generated code | |
run: dotnet build ./GeneratedCode/SwaggerCodegen/NetStandard20/NetStandard20.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.1 Swagger Codegen CLI generated code | |
run: dotnet build ./GeneratedCode/SwaggerCodegen/NetStandard21/NetStandard21.csproj | |
working-directory: test | |
- name: Generate code with AutoRest | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v csharp autorest ./OpenApi.${{ matrix.format }} GeneratedCode ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs --no-logging | |
cp ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs ./GeneratedCode/AutoRest-${{ matrix.version }}/Net6/Output.cs | |
cp ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs ./GeneratedCode/AutoRest-${{ matrix.version }}/Net7/Output.cs | |
cp ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs ./GeneratedCode/AutoRest-${{ matrix.version }}/Net48/Output.cs | |
cp ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs ./GeneratedCode/AutoRest-${{ matrix.version }}/Net472/Output.cs | |
cp ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs ./GeneratedCode/AutoRest-${{ matrix.version }}/Net462/Output.cs | |
cp ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs ./GeneratedCode/AutoRest-${{ matrix.version }}/Net481/Output.cs | |
cp ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs ./GeneratedCode/AutoRest-${{ matrix.version }}/NetStandard20/Output.cs | |
cp ./GeneratedCode/AutoRest-${{ matrix.version }}/Output.cs ./GeneratedCode/AutoRest-${{ matrix.version }}/NetStandard21/Output.cs | |
working-directory: test | |
continue-on-error: true | |
- name: Build .NET 6 AutoRest generated code | |
run: dotnet build ./GeneratedCode/AutoRest-${{ matrix.version }}/Net6/Net6.csproj | |
working-directory: test | |
- name: Build .NET 7 AutoRest generated code | |
run: dotnet build ./GeneratedCode/AutoRest-${{ matrix.version }}/Net7/Net7.csproj | |
working-directory: test | |
- name: Build .NET 4.8.1 AutoRest generated code | |
run: dotnet build ./GeneratedCode/AutoRest-${{ matrix.version }}/Net481/Net481.csproj | |
if: ${{ matrix.version == 'V2' && matrix.os == 'windows-2022' }} | |
working-directory: test | |
- name: Build .NET 4.8 AutoRest generated code | |
run: dotnet build ./GeneratedCode/AutoRest-${{ matrix.version }}/Net48/Net48.csproj | |
working-directory: test | |
- name: Build .NET 4.7.2 AutoRest generated code | |
run: dotnet build ./GeneratedCode/AutoRest-${{ matrix.version }}/Net472/Net472.csproj | |
working-directory: test | |
- name: Build .NET 4.6.2 AutoRest generated code | |
run: dotnet build ./GeneratedCode/AutoRest-${{ matrix.version }}/Net462/Net462.csproj | |
if: ${{ matrix.version == 'V2' }} | |
working-directory: test | |
- name: Build .NET Standard 2.0 AutoRest generated code | |
run: dotnet build ./GeneratedCode/AutoRest-${{ matrix.version }}/NetStandard20/NetStandard20.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.1 AutoRest generated code | |
run: dotnet build ./GeneratedCode/AutoRest-${{ matrix.version }}/NetStandard21/NetStandard21.csproj | |
working-directory: test | |
- name: Generate code with Kiota | |
run: dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v csharp kiota ./OpenApi.${{ matrix.format }} GeneratedCode ./GeneratedCode/Kiota/Output.cs --no-logging | |
working-directory: test | |
continue-on-error: ${{ matrix.os == 'macos-latest' }} | |
- name: Build Kiota generated code | |
run: dotnet build ./GeneratedCode/Kiota/Kiota.sln | |
working-directory: test | |
- name: Generate code with Refitter | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v csharp refitter ./OpenApi.${{ matrix.format }} GeneratedCode ./GeneratedCode/Refitter/Output.cs --no-logging | |
cp ./GeneratedCode/Refitter/Output.cs ./GeneratedCode/Refitter/Net6/Output.cs | |
cp ./GeneratedCode/Refitter/Output.cs ./GeneratedCode/Refitter/Net7/Output.cs | |
cp ./GeneratedCode/Refitter/Output.cs ./GeneratedCode/Refitter/Net48/Output.cs | |
cp ./GeneratedCode/Refitter/Output.cs ./GeneratedCode/Refitter/Net472/Output.cs | |
cp ./GeneratedCode/Refitter/Output.cs ./GeneratedCode/Refitter/Net462/Output.cs | |
cp ./GeneratedCode/Refitter/Output.cs ./GeneratedCode/Refitter/Net481/Output.cs | |
cp ./GeneratedCode/Refitter/Output.cs ./GeneratedCode/Refitter/NetStandard20/Output.cs | |
cp ./GeneratedCode/Refitter/Output.cs ./GeneratedCode/Refitter/NetStandard21/Output.cs | |
working-directory: test | |
- name: Build .NET 6 Refitter generated code | |
run: dotnet build ./GeneratedCode/Refitter/Net6/Net6.csproj | |
working-directory: test | |
- name: Build .NET 7 Refitter generated code | |
run: dotnet build ./GeneratedCode/Refitter/Net7/Net7.csproj | |
working-directory: test | |
- name: Build .NET 4.8.1 Refitter generated code | |
run: dotnet build ./GeneratedCode/Refitter/Net481/Net481.csproj | |
if: ${{ matrix.os == 'windows-2022' }} | |
working-directory: test | |
- name: Build .NET 4.8 Refitter generated code | |
run: dotnet build ./GeneratedCode/Refitter/Net48/Net48.csproj | |
working-directory: test | |
- name: Build .NET 4.7.2 Refitter generated code | |
run: dotnet build ./GeneratedCode/Refitter/Net472/Net472.csproj | |
working-directory: test | |
- name: Build .NET 4.6.2 Refitter generated code | |
run: dotnet build ./GeneratedCode/Refitter/Net462/Net462.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.0 Refitter generated code | |
run: dotnet build ./GeneratedCode/Refitter/NetStandard20/NetStandard20.csproj | |
working-directory: test | |
- name: Build .NET Standard 2.1 Refitter generated code | |
run: dotnet build ./GeneratedCode/Refitter/NetStandard21/NetStandard21.csproj | |
working-directory: test | |
JMeter: | |
strategy: | |
fail-fast: false | |
matrix: | |
format: [ json, yaml ] | |
version: [ V2, V3 ] | |
os: [ macos-latest, windows-2022, ubuntu-latest ] | |
name: JMeter | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Setup .NET versions | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
2.1.x | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
8.0.x | |
- name: Prepare Swagger Petstore OpenAPI Spec | |
run: cp ./OpenAPI/${{ matrix.version }}/Swagger.${{ matrix.format }} ./OpenApi.${{ matrix.format }} | |
working-directory: test | |
- name: Generate JMeter | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v jmeter ./OpenApi.${{ matrix.format }} --no-logging | |
working-directory: test | |
TypeScript: | |
strategy: | |
fail-fast: false | |
matrix: | |
format: [ json, yaml ] | |
version: [ V2, V3 ] | |
os: [ macos-latest, windows-2022, ubuntu-latest ] | |
name: TypeScript | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Setup .NET versions | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
2.1.x | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
8.0.x | |
- name: Prepare Swagger Petstore OpenAPI Spec | |
run: cp ./OpenAPI/${{ matrix.version }}/Swagger.${{ matrix.format }} ./OpenApi.${{ matrix.format }} | |
working-directory: test | |
- name: Generate TypeScript (Angular) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript Angular ./OpenApi.${{ matrix.format }} Angular --no-logging | |
working-directory: test | |
- name: Generate TypeScript (Aurelia) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript Aurelia ./OpenApi.${{ matrix.format }} Aurelia --no-logging | |
working-directory: test | |
- name: Generate TypeScript (Axios) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript Axios ./OpenApi.${{ matrix.format }} Axios --no-logging | |
working-directory: test | |
- name: Generate TypeScript (Fetch) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript Fetch ./OpenApi.${{ matrix.format }} Fetch --no-logging | |
working-directory: test | |
- name: Generate TypeScript (Inversify) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript Inversify ./OpenApi.${{ matrix.format }} Inversify --no-logging | |
working-directory: test | |
- name: Generate TypeScript (JQuery) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript JQuery ./OpenApi.${{ matrix.format }} JQuery --no-logging | |
working-directory: test | |
- name: Generate TypeScript (NestJS) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript NestJS ./OpenApi.${{ matrix.format }} NestJS --no-logging | |
working-directory: test | |
- name: Generate TypeScript (Node) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript Node ./OpenApi.${{ matrix.format }} Node --no-logging | |
working-directory: test | |
- name: Generate TypeScript (ReduxQuery) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript ReduxQuery ./OpenApi.${{ matrix.format }} ReduxQuery --no-logging | |
working-directory: test | |
- name: Generate TypeScript (Rxjs) | |
run: | | |
dotnet run --project ../src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -- -v typescript Rxjs ./OpenApi.${{ matrix.format }} Rxjs --no-logging | |
working-directory: test |