mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
c4256d8674
* AZP Bootstrap (cherry picked from commit33126b7267
) * AZP: Correct Cloud jobs (cherry picked from commit 2fea31b292377e17ba5447dcb79c4b753a6fad58) * Fix AZP CI (#1508) * Fix 2.9/2.10 cloud * Fix splunk callback tests. * ansible_virtualization_type on AZP can be one of container/containerd instead of docker for dockerized tests. * Disable nomad tests. * Work around AZP bugs. (cherry picked from commitdd55c3c3bb
) * Run tests on all groups. * Reduce 2.9 coverage to decrease large number of jobs. * Try to fix test. * Revert "Try to fix test." This reverts commit23f51451c6
. * Other target selection for 2.9. Co-authored-by: Felix Fontein <felix@fontein.de>
39 lines
1.7 KiB
YAML
39 lines
1.7 KiB
YAML
# This template adds a job for processing code coverage data.
|
|
# It will upload results to Azure Pipelines and codecov.io.
|
|
# Use it from a job stage that completes after all other jobs have completed.
|
|
# This can be done by placing it in a separate summary stage that runs after the test stage(s) have completed.
|
|
|
|
jobs:
|
|
- job: Coverage
|
|
displayName: Code Coverage
|
|
container: default
|
|
workspace:
|
|
clean: all
|
|
steps:
|
|
- checkout: self
|
|
fetchDepth: $(fetchDepth)
|
|
path: $(checkoutPath)
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: Download Coverage Data
|
|
inputs:
|
|
path: coverage/
|
|
patterns: "Coverage */*=coverage.combined"
|
|
- bash: .azure-pipelines/scripts/combine-coverage.py coverage/
|
|
displayName: Combine Coverage Data
|
|
- bash: .azure-pipelines/scripts/report-coverage.sh
|
|
displayName: Generate Coverage Report
|
|
condition: gt(variables.coverageFileCount, 0)
|
|
- task: PublishCodeCoverageResults@1
|
|
inputs:
|
|
codeCoverageTool: Cobertura
|
|
# Azure Pipelines only accepts a single coverage data file.
|
|
# That means only Python or PowerShell coverage can be uploaded, but not both.
|
|
# Set the "pipelinesCoverage" variable to determine which type is uploaded.
|
|
# Use "coverage" for Python and "coverage-powershell" for PowerShell.
|
|
summaryFileLocation: "$(outputPath)/reports/$(pipelinesCoverage).xml"
|
|
displayName: Publish to Azure Pipelines
|
|
condition: gt(variables.coverageFileCount, 0)
|
|
- bash: .azure-pipelines/scripts/publish-codecov.sh "$(outputPath)"
|
|
displayName: Publish to codecov.io
|
|
condition: gt(variables.coverageFileCount, 0)
|
|
continueOnError: true
|