|
| 1 | +trigger: |
| 2 | + branches: |
| 3 | + include: [ '*' ] |
| 4 | + exclude: [ 'refs/tags/*' ] |
| 5 | + |
| 6 | +jobs: |
| 7 | + |
| 8 | +- job: Windows |
| 9 | + pool: |
| 10 | + vmImage: vs2017-win2016 |
| 11 | + steps: |
| 12 | + |
| 13 | + - powershell: .\build.ps1 -Target Test -Configuration Release |
| 14 | + displayName: Build and test |
| 15 | + |
| 16 | + # Workaround for https://github.com/nunit/nunit/issues/3012#issuecomment-441517922 |
| 17 | + - task: PublishTestResults@2 |
| 18 | + displayName: Publish net35 test results |
| 19 | + inputs: |
| 20 | + testResultsFormat: NUnit |
| 21 | + testResultsFiles: test-results\net35\*.xml |
| 22 | + mergeTestResults: true |
| 23 | + testRunTitle: net35/Windows |
| 24 | + condition: succeededOrFailed() |
| 25 | + - task: PublishTestResults@2 |
| 26 | + displayName: Publish netcoreapp1.1 test results |
| 27 | + inputs: |
| 28 | + testResultsFormat: NUnit |
| 29 | + testResultsFiles: test-results\netcoreapp1.1\*.xml |
| 30 | + mergeTestResults: true |
| 31 | + testRunTitle: netcoreapp1.1/Windows |
| 32 | + condition: succeededOrFailed() |
| 33 | + - task: PublishTestResults@2 |
| 34 | + displayName: Publish netcoreapp2.0 test results |
| 35 | + inputs: |
| 36 | + testResultsFormat: NUnit |
| 37 | + testResultsFiles: test-results\netcoreapp2.0\*.xml |
| 38 | + mergeTestResults: true |
| 39 | + testRunTitle: netcoreapp2.0/Windows |
| 40 | + condition: succeededOrFailed() |
| 41 | + |
| 42 | + - powershell: .\build.ps1 -Target Package --artifact-dir='$(Build.ArtifactStagingDirectory)' |
| 43 | + displayName: Package |
| 44 | + |
| 45 | + - task: PublishBuildArtifacts@1 |
| 46 | + displayName: Save package artifacts |
| 47 | + inputs: |
| 48 | + PathtoPublish: $(Build.ArtifactStagingDirectory) |
| 49 | + ArtifactName: Package |
| 50 | + |
| 51 | +- job: Linux |
| 52 | + pool: |
| 53 | + vmImage: ubuntu-16.04 |
| 54 | + steps: |
| 55 | + |
| 56 | + - bash: ./build.sh --target Test --configuration Release |
| 57 | + displayName: Build and test |
| 58 | + |
| 59 | + # Workaround for https://github.com/nunit/nunit/issues/3012#issuecomment-441517922 |
| 60 | + - task: PublishTestResults@2 |
| 61 | + displayName: Publish net35 test results |
| 62 | + inputs: |
| 63 | + testResultsFormat: NUnit |
| 64 | + testResultsFiles: test-results/net35/*.xml |
| 65 | + mergeTestResults: true |
| 66 | + testRunTitle: net35/Linux |
| 67 | + condition: succeededOrFailed() |
| 68 | + - task: PublishTestResults@2 |
| 69 | + displayName: Publish netcoreapp1.1 test results |
| 70 | + inputs: |
| 71 | + testResultsFormat: NUnit |
| 72 | + testResultsFiles: test-results/netcoreapp1.1/*.xml |
| 73 | + mergeTestResults: true |
| 74 | + testRunTitle: netcoreapp1.1/Linux |
| 75 | + condition: succeededOrFailed() |
| 76 | + - task: PublishTestResults@2 |
| 77 | + displayName: Publish netcoreapp2.0 test results |
| 78 | + inputs: |
| 79 | + testResultsFormat: NUnit |
| 80 | + testResultsFiles: test-results/netcoreapp2.0/*.xml |
| 81 | + mergeTestResults: true |
| 82 | + testRunTitle: netcoreapp2.0/Linux |
| 83 | + condition: succeededOrFailed() |
| 84 | + |
| 85 | +- job: macOS |
| 86 | + pool: |
| 87 | + vmImage: macOS-10.13 |
| 88 | + steps: |
| 89 | + |
| 90 | + - bash: ./build.sh --target Test --configuration Release |
| 91 | + displayName: Build and test |
| 92 | + |
| 93 | + # Workaround for https://github.com/nunit/nunit/issues/3012#issuecomment-441517922 |
| 94 | + - task: PublishTestResults@2 |
| 95 | + displayName: Publish net35 test results |
| 96 | + inputs: |
| 97 | + testResultsFormat: NUnit |
| 98 | + testResultsFiles: test-results/net35/*.xml |
| 99 | + mergeTestResults: true |
| 100 | + testRunTitle: net35/macOS |
| 101 | + condition: succeededOrFailed() |
| 102 | + - task: PublishTestResults@2 |
| 103 | + displayName: Publish netcoreapp1.1 test results |
| 104 | + inputs: |
| 105 | + testResultsFormat: NUnit |
| 106 | + testResultsFiles: test-results/netcoreapp1.1/*.xml |
| 107 | + mergeTestResults: true |
| 108 | + testRunTitle: netcoreapp1.1/macOS |
| 109 | + condition: succeededOrFailed() |
| 110 | + - task: PublishTestResults@2 |
| 111 | + displayName: Publish netcoreapp2.0 test results |
| 112 | + inputs: |
| 113 | + testResultsFormat: NUnit |
| 114 | + testResultsFiles: test-results/netcoreapp2.0/*.xml |
| 115 | + mergeTestResults: true |
| 116 | + testRunTitle: netcoreapp2.0/macOS |
| 117 | + condition: succeededOrFailed() |
0 commit comments