forked from illuscio-dev/azure-pipelines-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.yml
67 lines (54 loc) · 1.71 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# PIPELINE CONFIGURATION
parameters:
# What the primary language of this build is. Choices are GO | PYTHON | DOCKER
- name: language
type: string
# Whether to run tests
- name: runTests
type: boolean
default: true
# Whether to start a mongo test container.
- name: testMongo
type: boolean
default: false
# Whether to start a Rabbit test container.
- name: testRabbit
type: boolean
default: false
# Whether to start a Redis test container.
- name: testRedis
type: boolean
default: false
# Whether to start a Postgres test container.
- name: testPostgres
type: boolean
default: false
steps:
- template: test_start_containers.yml
parameters:
testMongo: ${{parameters.testMongo}}
testRabbit: ${{parameters.testRabbit}}
testRedis: ${{parameters.testRedis}}
testPostgres: ${{parameters.testPostgres}}
- ${{ if eq( parameters.language, 'GO') }}:
- template: test_go.yml
- ${{ if eq( parameters.language, 'PYTHON') }}:
- template: test_python.yml
- ${{ if eq( parameters.language, 'RUST') }}:
- template: test_rust.yml
- ${{ if eq( parameters.language, 'ELIXIR') }}:
- template: test_elixir.yml
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml
reportDirectory: $(System.DefaultWorkingDirectory)/**/coverage
condition: succeededOrFailed()
displayName: Publish coverage report
- task: PublishTestResults@2
displayName: Publish test results
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: reports/tests_junit.xml
failTaskOnFailedTests: true