Skip to content

Commit

Permalink
Td/abzu 144599 stryker (#272)
Browse files Browse the repository at this point in the history
* Abzu 144599 - use .NET 8 for Stryker

* Try sdk instead of runtime

* Ignore .NET 6 for the moment

* Show installed dotnet

* Try without code checkout

* SDK version

* Temp update to global json

* Match SDK versions

* More testing

* Suppress checkout

* Try specifying dotnet SDK

* More testing

* Try again

* And again

* Don't overwrite global.json

* Test

* Further test

* Final tidy
  • Loading branch information
HugoBurgess authored Feb 22, 2024
1 parent 910cab6 commit 9a2330b
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ stages:
- stage: Stryker_Mutator
displayName: "Stryker Mutator"
dependsOn: []
variables:
- name: StrykerDotNetVersion
value: 8.0.x
jobs:
- job: Stryker
workspace:
Expand All @@ -63,21 +66,39 @@ stages:
packageType: sdk
useGlobalJson: true
workingDirectory: '$(Build.SourcesDirectory)'

- task: UseDotNet@2
displayName: 'Use .NET SDK for Stryker'
inputs:
packageType: sdk
version: $(StrykerDotNetVersion)

- task: PowerShell@1
displayName: "Create global.json for .NET"
inputs:
scriptType: inlineScript
workingFolder: $(Agent.TempDirectory)
inlineScript: |
dotnet new globaljson --sdk-version $(StrykerDotNetVersion)
- task: DotNetCoreCLI@2
displayName: "Install Stryker"
inputs:
command: custom
custom: tool
workingDirectory: $(Agent.TempDirectory)
arguments: install dotnet-stryker --tool-path $(Agent.BuildDirectory)/tools

- task: Powershell@2
displayName: "Run Stryker"
inputs:
workingDirectory: '$(Build.SourcesDirectory)\UKHO.ExchangeSetService.API'
targetType: 'inline'
pwsh: true
script: $(Agent.BuildDirectory)/tools/dotnet-stryker

- task: PublishMutationReport@0
displayName: 'Publish Strkyer Mutator Report'
displayName: 'Publish Stryker Mutator Report'
inputs:
reportPattern: '**/mutation-report.html'

Expand Down

0 comments on commit 9a2330b

Please sign in to comment.