Debian Codegraph @

.azure-pipelines/templates/test.yml

raw
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 timeoutInMinutes: 65
16 workspace:
17 clean: all
18 steps:
19 - checkout: self
20 fetchDepth: $(fetchDepth)
21 path: $(checkoutPath)
22 - bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
23 displayName: Run Tests
24 - bash: .azure-pipelines/scripts/process-results.sh
25 condition: succeededOrFailed()
26 displayName: Process Results
27 - bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
28 condition: eq(variables.haveCoverageData, 'true')
29 displayName: Aggregate Coverage Data
30 - task: PublishTestResults@2
31 condition: eq(variables.haveTestResults, 'true')
32 inputs:
33 testResultsFiles: "$(outputPath)/junit/*.xml"
34 displayName: Publish Test Results
35 - task: PublishPipelineArtifact@1
36 condition: eq(variables.haveBotResults, 'true')
37 displayName: Publish Bot Results
38 inputs:
39 targetPath: "$(outputPath)/bot/"
40 artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
41 - task: PublishPipelineArtifact@1
42 condition: eq(variables.haveCoverageData, 'true')
43 displayName: Publish Coverage Data
44 inputs:
45 targetPath: "$(Agent.TempDirectory)/coverage/"
46 artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"