Debian Codegraph @

ansible_collections/community/windows/.azure-pipelines/templates/test.yml

raw symbols SCIP
1 # This template uses the provided list of jobs to create test one or more test jobs.
2 # It can be used directly if needed, or through the matrix template.
3
4 parameters:
5 # A required list of dictionaries, one per test job.
6 # Each item in the list must contain a "job" and "name" key.
7 - name: jobs
8 type: object
9
10 jobs:
11 - ${{ each job in parameters.jobs }}:
12 - job: test_${{ replace(replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_'), '@', '_') }}
13 displayName: ${{ job.name }}
14 container: $[ variables.defaultContainer ]
15 workspace:
16 clean: all
17 steps:
18 - checkout: self
19 fetchDepth: $(fetchDepth)
20 path: $(checkoutPath)
21 - task: DownloadPipelineArtifact@2
22 inputs:
23 artifact: CollectionRequirements
24 path: $(Agent.TempDirectory)
25 - bash: |
26 sudo chown -R "$(whoami)" "${PWD}/../../../ansible_collections"
27 cp -R "$(Agent.TempDirectory)/ansible_collections"/. "${PWD}/../../../ansible_collections"
28 displayName: Set up dependencies
29 - bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
30 displayName: Run Tests
31 - bash: .azure-pipelines/scripts/process-results.sh
32 condition: succeededOrFailed()
33 displayName: Process Results
34 - bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
35 condition: eq(variables.haveCoverageData, 'true')
36 displayName: Aggregate Coverage Data
37 - task: PublishTestResults@2
38 condition: eq(variables.haveTestResults, 'true')
39 inputs:
40 testResultsFiles: "$(outputPath)/junit/*.xml"
41 displayName: Publish Test Results
42 - task: PublishPipelineArtifact@1
43 condition: eq(variables.haveBotResults, 'true')
44 displayName: Publish Bot Results
45 inputs:
46 targetPath: "$(outputPath)/bot/"
47 artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
48 - task: PublishPipelineArtifact@1
49 condition: eq(variables.haveCoverageData, 'true')
50 displayName: Publish Coverage Data
51 inputs:
52 targetPath: "$(Agent.TempDirectory)/coverage/"
53 artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"