Skip to content

Commit

Permalink
Enable Swagger Parser Tests (#4845)
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu authored Dec 5, 2022
1 parent 441fb32 commit c151cca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
12 changes: 9 additions & 3 deletions eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ parameters:
- name: ToolDirectory
type: string
default: ''
- name: PackageDirectory
type: string
default: ''
- name: TestDirectory
type: string
default: ''
- name: DotNetCoreVersion
type: string
default: ''
Expand Down Expand Up @@ -62,7 +68,7 @@ stages:

- script: 'dotnet pack /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) $(Warn) -c Release'
displayName: 'Build and Package'
workingDirectory: $(Build.SourcesDirectory)/${{parameters.ToolDirectory}}
workingDirectory: '${{ coalesce(parameters.PackageDirectory, parameters.ToolDirectory) }}'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -72,7 +78,7 @@ stages:
parameters:
StagingDirectory: $(Build.ArtifactStagingDirectory)
BuildMatrix: ${{ parameters.StandaloneExeMatrix }}
TargetDirectory: $(Build.SourcesDirectory)/${{parameters.ToolDirectory}}
TargetDirectory: '${{ coalesce(parameters.PackageDirectory, parameters.ToolDirectory) }}'

- publish: $(Build.ArtifactStagingDirectory)
displayName: Publish package to run artifacts
Expand All @@ -90,7 +96,7 @@ stages:

- script: 'dotnet test /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) $(Warn) --logger trx'
displayName: 'Test'
workingDirectory: $(Build.SourcesDirectory)/${{parameters.ToolDirectory}}
workingDirectory: '${{ coalesce(parameters.TestDirectory, parameters.ToolDirectory) }}'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand Down
7 changes: 4 additions & 3 deletions tools/apiview/parsers/swagger-api-parser/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trigger:
- hotfix/*
paths:
include:
- tools/apiview/parsers/swagger-api-parser/SwaggerApiParser
- tools/apiview/parsers/swagger-api-parser

pr:
branches:
Expand All @@ -19,10 +19,11 @@ pr:
- hotfix/*
paths:
include:
- tools/apiview/parsers/swagger-api-parser/SwaggerApiParser
- tools/apiview/parsers/swagger-api-parser

extends:
template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml
parameters:
ToolDirectory: tools/apiview/parsers/swagger-api-parser/SwaggerApiParser
PackageDirectory: $(Build.SourcesDirectory)/tools/apiview/parsers/swagger-api-parser/SwaggerApiParser
TestDirectory: $(Build.SourcesDirectory)/tools/apiview/parsers/swagger-api-parser/SwaggerApiParserTest
SkipDotNetInstall: true

0 comments on commit c151cca

Please sign in to comment.