Skip to content

Commit

Permalink
Split out Unit Tests and Smoke Tests as separate Jobs in the Pipeline…
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-hawker committed Dec 10, 2020
1 parent 1ebc426 commit ab8abf2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 24 deletions.
2 changes: 1 addition & 1 deletion SmokeTests/SmokeTests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Inputs="@(ProjectsToBuild)"
Outputs="%(Filename)">

<Message Importance="High" Text="Building project %(ProjectsToBuild.Filename): (%(ProjectsToBuild.Configuration)|%(ProjectsToBuild.Platform))" />
<Message Importance="High" Text="Building project %(ProjectsToBuild.Identity): (%(ProjectsToBuild.Configuration)|%(ProjectsToBuild.Platform))" />

<MSBuild Projects="SmokeTest.csproj"
Targets="restore;build"
Expand Down
60 changes: 37 additions & 23 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ variables:
BuildConfiguration: Release

jobs:
- job: ToolkitBuild
timeoutInMinutes: 120
### BUILD ###
- job: BuildBits
timeoutInMinutes: 60

steps:
- task: BatchScript@1
Expand Down Expand Up @@ -45,15 +46,35 @@ jobs:
- powershell: .\build\build.ps1 -target=Build
displayName: Build

- powershell: .\build\build.ps1 -target=Test
displayName: Test
timeoutInMinutes: 15

- powershell: .\build\build.ps1 -target=Package
displayName: Package

- powershell: .\build\build.ps1 -target=SmokeTest
displayName: SmokeTest
- task: PowerShell@2
displayName: Authenticode Sign Packages
inputs:
filePath: build/Sign-Package.ps1
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
ArtifactDirectory: bin\nupkg
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))

- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
inputs:
pathToPublish: .\bin\nupkg
artifactType: container
artifactName: Packages

### Unit Tests ###

- job: UnitTests
dependsOn: BuildBits
timeoutInMinutes: 20

steps:
- powershell: .\build\build.ps1 -target=Test
displayName: Test

- task: PublishTestResults@2
inputs:
Expand All @@ -76,22 +97,15 @@ jobs:
artifactName: WexErrorLogFileOutput
condition: failed()

- task: PowerShell@2
displayName: Authenticode Sign Packages
inputs:
filePath: build/Sign-Package.ps1
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
ArtifactDirectory: bin\nupkg
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
### Smoke Tests ###

- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
inputs:
pathToPublish: .\bin\nupkg
artifactType: container
artifactName: Packages
- job: SmokeTests
dependsOn: BuildBits
timeoutInMinutes: 40

steps:
- powershell: .\build\build.ps1 -target=SmokeTest
displayName: SmokeTest

- task: CopyFiles@2
inputs:
Expand Down

0 comments on commit ab8abf2

Please sign in to comment.