Skip to content

Commit

Permalink
Juliens/az pipelines fix (#3)
Browse files Browse the repository at this point in the history
* apply review

* test vars

* python and golang fix

* using vendor bin

* fix and clean
  • Loading branch information
julienstroheker committed Jan 27, 2020
1 parent c2f561a commit 735cb62
Show file tree
Hide file tree
Showing 38 changed files with 2,951 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ __pycache__
/python/az/aro/dist
/secrets
/mdm_statsd.socket
uts.txt
cover.out
coverage.*
report.xml
/uts.txt
/cover.out
/coverage.*
/report.xml
16 changes: 5 additions & 11 deletions .pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@ jobs:
strategy:
matrix:
Python27:
python.version: "2.7.17"
python.version: "2.7"
Python35:
python.version: "3.5.9"
Python36:
python.version: "3.6.10"
Python37:
python.version: "3.7.6"
Python38:
python.version: "3.8.1"
python.version: "3.5"

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -54,9 +48,9 @@ jobs:
set -x
make test-go
[[ -z "$(git status -s)" ]]
bash -c 'go-junit-report < uts.txt > report.xml'
bash -c 'gocov convert cover.out > coverage.json'
bash -c 'gocov-xml < coverage.json > coverage.xml'
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
workingDirectory: "${{ variables.modulePath }}"
displayName: "🧪Run Golang Unit Tests"
- task: PublishTestResults@2
Expand Down
9 changes: 1 addition & 8 deletions .pipelines/templates/template-setup-golang-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@ steps:
mkdir -p '${{ parameters.gobin }}'
mkdir -p '${{ parameters.gopath }}/pkg'
mkdir -p '${{ parameters.modulePath }}'
shopt -s extglob
shopt -s dotglob
mv !(gopath) '${{ parameters.modulePath }}'
export PATH=${{ parameters.gobin }}:$PATH
export PATH=${{ parameters.goroot }}/bin:$PATH
ls -a | grep -v ${{ parameters.gopath }} | xargs mv -t ${{ parameters.modulePath }}
echo "##vso[task.prependpath]${{ parameters.gobin }}"
echo "##vso[task.prependpath]${{ parameters.goroot }}/bin"
go get -v github.com/jstemmer/go-junit-report
go get -v github.com/axw/gocov/gocov
go get -v github.com/AlekSi/gocov-xml
sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get update
sudo apt-get install libgpgme-dev gcc -y
Expand Down
44 changes: 41 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ required = [
"github.com/alvaroloes/enumer",
"github.com/jim-minter/go-cosmosdb/cmd/gencosmosdb",
"github.com/golang/mock/mockgen",
"golang.org/x/tools/cmd/goimports"
"golang.org/x/tools/cmd/goimports",
"github.com/jstemmer/go-junit-report",
"github.com/axw/gocov/gocov",
"github.com/AlekSi/gocov-xml"
]

[[constraint]]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ proxy:
go build -ldflags "-X main.gitCommit=$(COMMIT)" ./hack/proxy

pyenv${PYTHON_VERSION}:
virtualenv pyenv${PYTHON_VERSION}
virtualenv --python=/usr/bin/python${PYTHON_VERSION} pyenv${PYTHON_VERSION}
. pyenv${PYTHON_VERSION}/bin/activate && \
pip install azdev && \
azdev setup -r . && \
Expand Down
4 changes: 4 additions & 0 deletions vendor/github.com/AlekSi/gocov-xml/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions vendor/github.com/AlekSi/gocov-xml/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/github.com/AlekSi/gocov-xml/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions vendor/github.com/AlekSi/gocov-xml/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 61 additions & 0 deletions vendor/github.com/AlekSi/gocov-xml/coverage-04.dtd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 735cb62

Please sign in to comment.