diff --git a/build/ci-build.yml b/build/ci-build.yml index b6c6c4b4..83e91248 100644 --- a/build/ci-build.yml +++ b/build/ci-build.yml @@ -112,40 +112,39 @@ stages: projectName: '$(Project).Tests.Unit' testName: '$(Project).${{UnitTest.name}}' - - ${{ each IntegrationTest in parameters.IntegrationTests }}: - - stage: IntegrationTests_${{replace(IntegrationTest.name, '.', '_')}} - displayName: Integration Tests - ${{IntegrationTest.name}} - dependsOn: Build - condition: succeeded() - jobs: - - job: RunIntegrationTests - displayName: 'Run integration tests' - strategy: - maxParallel: 1 - matrix: - linux: - imageName: ${{ variables['Vm.Linux.Image']}} - windows: - imageName: ${{ variables['Vm.Windows.Image']}} - pool: - vmImage: '$(imageName)' - steps: - - task: DownloadPipelineArtifact@2 - displayName: 'Download build artifacts' - inputs: - artifact: 'Build' - path: '$(Build.SourcesDirectory)' - - template: 'templates/run-pester-tests.yml' - parameters: - projectName: '$(Project).Tests.Integration' - testName: '$(Project).${{IntegrationTest.name}}' + - stage: IntegrationTests + displayName: Integration Tests + dependsOn: Build + condition: succeeded() + jobs: + - ${{ each IntegrationTest in parameters.IntegrationTests }}: + - job: RunIntegrationTests_${{replace(IntegrationTest.name, '.', '_')}} + displayName: 'Run integration tests - ${{IntegrationTest.name}}' + strategy: + maxParallel: 1 + matrix: + linux: + imageName: ${{ variables['Vm.Linux.Image']}} + windows: + imageName: ${{ variables['Vm.Windows.Image']}} + pool: + vmImage: '$(imageName)' + steps: + - task: DownloadPipelineArtifact@2 + displayName: 'Download build artifacts' + inputs: + artifact: 'Build' + path: '$(Build.SourcesDirectory)' + - template: 'templates/run-pester-tests.yml' + parameters: + projectName: '$(Project).Tests.Integration' + testName: '$(Project).${{IntegrationTest.name}}' - stage: ReleaseToMyget displayName: 'Release to MyGet' dependsOn: - UnitTests - - ${{ each IntegrationTest in parameters.IntegrationTests }}: - - IntegrationTests_${{replace(IntegrationTest.name, '.', '_')}} + - IntegrationTests condition: succeeded() jobs: - job: PushToMyGet diff --git a/build/psgallery-release.yml b/build/psgallery-release.yml index ffbec181..7e441d69 100644 --- a/build/psgallery-release.yml +++ b/build/psgallery-release.yml @@ -84,62 +84,60 @@ stages: targetPath: '$(Pipeline.Workspace)/build' artifactName: Build - - ${{ each UnitTest in parameters.UnitTests }}: - - stage: UnitTests_${{replace(UnitTest.name, '.', '_')}} - displayName: Unit Tests - ${{UnitTest.name}} - dependsOn: Build - condition: succeeded() - jobs: - - job: RunUnitTests - displayName: 'Run unit tests' - pool: - vmImage: '$(Vm.Linux.Image)' - steps: - - task: DownloadPipelineArtifact@2 - displayName: 'Download build artifacts' - inputs: - artifact: 'Build' - path: '$(Build.SourcesDirectory)' - - template: 'templates/run-pester-tests.yml' - parameters: - projectName: '$(Project).Tests.Unit' - testName: '$(Project).${{UnitTest.name}}' + - stage: UnitTests + displayName: Unit Tests + dependsOn: Build + condition: succeeded() + jobs: + - ${{ each UnitTest in parameters.UnitTests }}: + - job: RunUnitTests_${{replace(UnitTest.name, '.', '_')}} + displayName: 'Run unit tests - ${{UnitTest.name}}' + pool: + vmImage: '$(Vm.Linux.Image)' + steps: + - task: DownloadPipelineArtifact@2 + displayName: 'Download build artifacts' + inputs: + artifact: 'Build' + path: '$(Build.SourcesDirectory)' + - template: 'templates/run-pester-tests.yml' + parameters: + projectName: '$(Project).Tests.Unit' + testName: '$(Project).${{UnitTest.name}}' - - ${{ each IntegrationTest in parameters.IntegrationTests }}: - - stage: IntegrationTests_${{replace(IntegrationTest.name, '.', '_')}} - displayName: Integration Tests - ${{IntegrationTest.name}} - dependsOn: Build - condition: succeeded() - jobs: - - job: RunIntegrationTests - displayName: 'Run integration tests' - strategy: - maxParallel: 1 - matrix: - linux: - imageName: ${{ variables['Vm.Linux.Image']}} - windows: - imageName: ${{ variables['Vm.Windows.Image']}} - pool: - vmImage: '$(imageName)' - steps: - - task: DownloadPipelineArtifact@2 - displayName: 'Download build artifacts' - inputs: - artifact: 'Build' - path: '$(Build.SourcesDirectory)' - - template: 'templates/run-pester-tests.yml' - parameters: - projectName: '$(Project).Tests.Integration' - testName: '$(Project).${{IntegrationTest.name}}' + - stage: IntegrationTests + displayName: Integration Tests + dependsOn: Build + condition: succeeded() + jobs: + - ${{ each IntegrationTest in parameters.IntegrationTests }}: + - job: RunIntegrationTests_${{replace(IntegrationTest.name, '.', '_')}} + displayName: 'Run integration tests - ${{IntegrationTest.name}}' + strategy: + maxParallel: 1 + matrix: + linux: + imageName: ${{ variables['Vm.Linux.Image']}} + windows: + imageName: ${{ variables['Vm.Windows.Image']}} + pool: + vmImage: '$(imageName)' + steps: + - task: DownloadPipelineArtifact@2 + displayName: 'Download build artifacts' + inputs: + artifact: 'Build' + path: '$(Build.SourcesDirectory)' + - template: 'templates/run-pester-tests.yml' + parameters: + projectName: '$(Project).Tests.Integration' + testName: '$(Project).${{IntegrationTest.name}}' - stage: Release displayName: 'Release to PowerShell Gallery' dependsOn: - - ${{ each UnitTest in parameters.UnitTests }}: - - UnitTests_${{replace(UnitTest.name, '.', '_')}} - - ${{ each IntegrationTest in parameters.IntegrationTests }}: - - IntegrationTests_${{replace(IntegrationTest.name, '.', '_')}} + - UnitTests + - IntegrationTests condition: succeeded() jobs: - job: PushToNuGet