Signed-off-by: Petr Kotas <pkotas@redhat.com>
This commit is contained in:
Petr Kotas 2021-04-27 10:40:34 +02:00
Родитель bb7ecaa20d
Коммит 5e33211ec1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 9A2182A6A306C71D
1 изменённых файлов: 47 добавлений и 20 удалений

Просмотреть файл

@ -1,20 +1,24 @@
# Azure DevOps Pipeline running CI
trigger:
- master
branches:
include:
- master
paths:
exclude:
- docs/*
pr:
branches:
include:
- master
paths:
exclude:
- docs/*
variables:
- template: vars.yml
jobs:
- job: Golang_Code_Lint
pool: ARO-CI
steps:
- template: ./templates/template-checkout.yml
- script: |
set -xe
make lint-go
[[ -z "$(git status -s)" ]]
displayName: 🕵Run Golang Linters
- job: Python_Unit_Tests
pool:
@ -32,18 +36,35 @@ jobs:
name: ARO-CI
steps:
- template: ./templates/template-checkout.yml
- script: |
set -xe
make test-go
[[ -z "$(git status -s)" ]]
displayName: 🧪Run Golang Unit Tests
- script: |
go run ./vendor/github.com/jstemmer/go-junit-report/go-junit-report.go < uts.txt > report.xml
go run ./vendor/github.com/axw/gocov/gocov/*.go convert cover.out > coverage.json
go run ./vendor/github.com/AlekSi/gocov-xml/gocov-xml.go < coverage.json > coverage.xml
displayName: ⚙️ Process Reports
condition: succeededOrFailed()
set -xe
make generate
[[ -z "$(git status -s)" ]]
displayName: ⚙️ Run Golang code generate
- script: |
set -xe
make validate-go
[[ -z "$(git status -s)" ]]
displayName: 🕵️ Validate Golang code
- script: |
set -xe
make lint-go
[[ -z "$(git status -s)" ]]
displayName: 🕵️ Lint Golang code
- script: |
set -xe
make build-all
[[ -z "$(git status -s)" ]]
displayName: 🕵️ Build Golang code
- script: |
set -xe
make unit-test-go
displayName: 🧪 Run Golang unit tests
- task: PublishTestResults@2
displayName: 📊 Publish tests results
@ -51,6 +72,12 @@ jobs:
testResultsFiles: $(System.DefaultWorkingDirectory)/**/report.xml
condition: succeededOrFailed()
- script: |
go run ./vendor/github.com/axw/gocov/gocov/*.go convert cover.out > coverage.json
go run ./vendor/github.com/AlekSi/gocov-xml/gocov-xml.go < coverage.json > coverage.xml
displayName: ⚙️ Process Reports
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
displayName: 📈 Publish code coverage
inputs: