-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathinclude-runtests-linux.yml
More file actions
43 lines (42 loc) · 1.55 KB
/
include-runtests-linux.yml
File metadata and controls
43 lines (42 loc) · 1.55 KB
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
parameters:
- name: RunName
type: string
- name: SQLCMDUSER
type: string
default: ''
- name: SQLPASSWORD
type: string
default: ''
- name: SQLCMDSERVER
type: string
default: .
- name: SQLCMDDBNAME
type: string
default: ''
steps:
- script: |
~/go/bin/gotestsum --junitfile "${{ parameters.RunName }}.testresults.xml" -- ./... -coverprofile="${{ parameters.RunName }}.coverage.txt" -covermode count
~/go/bin/gocov convert "${{ parameters.RunName }}.coverage.txt" > "${{ parameters.RunName }}.coverage.json"
~/go/bin/gocov-xml < "${{ parameters.RunName }}.coverage.json" > ${{ parameters.RunName }}.coverage.xml
mkdir -p coverage
workingDirectory: '$(Build.SourcesDirectory)'
displayName: 'run tests'
env:
SQLPASSWORD: ${{ parameters.SQLPASSWORD }}
SQLCMDUSER: ${{ parameters.SQLCMDUSER }}
SQLCMDPASSWORD: ${{ parameters.SQLPASSWORD }}
SQLCMDSERVER: ${{ parameters.SQLCMDSERVER }}
SQLCMDDBNAME: ${{ parameters.SQLCMDDBNAME }}
AZURESUBSCRIPTION_CLIENT_ID : $(AZURESUBSCRIPTION_CLIENT_ID)
AZURESUBSCRIPTION_TENANT_ID : $(AZURESUBSCRIPTION_TENANT_ID)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
continueOnError: true
- task: PublishTestResults@2
displayName: "Publish junit-style results"
inputs:
testResultsFiles: '${{ parameters.RunName }}.testresults.xml'
testResultsFormat: JUnit
searchFolder: '$(Build.SourcesDirectory)'
testRunTitle: '${{ parameters.RunName }} - $(Build.SourceBranchName)'
failTaskOnFailedTests: true
condition: always()