-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
172 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Go | ||
# Build your Go project. | ||
# Add steps that test, save build artifacts, deploy, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/go | ||
|
||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
exclude: | ||
- README.md | ||
- LICENSE | ||
- .gitignore | ||
|
||
pr: | ||
autoCancel: true | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
exclude: | ||
- README.md | ||
- LICENSE | ||
- .gitignore | ||
|
||
variables: | ||
GOPATH: '$(Pipeline.Workspace)/go' | ||
|
||
stages: | ||
- stage: Linux_Test | ||
jobs: | ||
- template: templates/azure/jobs/test.yml | ||
parameters: | ||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
os: 'linux' | ||
- stage: Mac_Test | ||
jobs: | ||
- template: templates/azure/jobs/test.yml | ||
parameters: | ||
pool: | ||
vmImage: 'macos-10.14' | ||
os: 'macos' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
jobs: | ||
- job: RunTests | ||
strategy: | ||
matrix: | ||
GoVersion_1_13: | ||
go.version: '1.13' | ||
GoVersion_1_14: | ||
go.version: '1.14' | ||
|
||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
|
||
steps: | ||
- script: echo ${{ parameters.os }} | ||
|
||
- template: ../steps/setup_go.yml | ||
parameters: | ||
goVersion: '$(go.version)' | ||
|
||
- template: ../steps/format_go.yml | ||
|
||
- ${{ if eq(parameters.os, 'linux') }}: | ||
- template: ../steps/install_tiledb_linux.yml | ||
|
||
- ${{ if eq(parameters.os, 'macos') }}: | ||
- template: ../steps/install_tiledb_macos.yml | ||
|
||
- script: | | ||
set -e -x | ||
go version | ||
go get -u github.com/jstemmer/go-junit-report | ||
go get github.com/axw/gocov/gocov | ||
go get github.com/AlekSi/gocov-xml | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0 | ||
curl https://cdn.shiftleft.io/download/sl > $(go env GOPATH)/bin/sl && chmod a+rx $(go env GOPATH)/bin/sl | ||
displayName: 'Install Dependencies' | ||
- ${{ if eq(parameters.os, 'linux') }}: | ||
- script: | | ||
set -e -x | ||
golangci-lint run | ||
displayName: 'Run Code Quality Checks' | ||
- script: | | ||
set -v -x | ||
go test -v -coverprofile=coverage.txt -covermode count ./... > test_results.txt | ||
go-junit-report < test_results.txt > report.xml | ||
displayName: 'Run Unit Tests' | ||
- task: PublishTestResults@2 | ||
displayName: 'Publish Test Results' | ||
inputs: | ||
testRunner: JUnit | ||
testResultsFiles: $(System.DefaultWorkingDirectory)/**/report.xml | ||
|
||
- script: | | ||
set -e -x | ||
gocov convert coverage.txt > coverage.json | ||
gocov-xml < coverage.json > coverage.xml | ||
displayName: 'Run Code Coverage Tests' | ||
- task: PublishCodeCoverageResults@1 | ||
displayName: 'Publish Code Coverage' | ||
inputs: | ||
codeCoverageTool: Cobertura | ||
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
steps: | ||
- script: | | ||
ls -al | ||
if [[ -n "$(gofmt -l .)" ]]; then | ||
echo "TileDB-Go code is not formatted:" | ||
gofmt -d . | ||
exit 1 | ||
else | ||
echo "TileDB-Go code is well formatted." | ||
fi | ||
displayName: 'Checks formatting of Go code' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Install TileDB in a system location | ||
steps: | ||
- script: | | ||
set -e -x | ||
curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/2.0.8/tiledb-linux-2.0.8-db41376-full.tar.gz \ | ||
&& sudo tar -C /usr/local -xf tiledb.tar.gz | ||
sudo ldconfig /usr/local/lib | ||
displayName: 'Install TileDB' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Install TileDB in a system location | ||
steps: | ||
- script: | | ||
set -e -x | ||
curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/2.0.8/tiledb-macos-2.0.8-db41376-full.tar.gz \ | ||
&& sudo tar -C /usr/local -xf tiledb.tar.gz | ||
displayName: 'Install TileDB' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
parameters: | ||
goVersion: '1.14' | ||
|
||
steps: | ||
- task: GoTool@0 | ||
displayName: 'Use Go ${{ parameters.goVersion }}' | ||
inputs: | ||
version: ${{ parameters.goVersion }} | ||
|
||
- script: | | ||
set -e -x | ||
mkdir -p '$(GOPATH)/bin' | ||
echo '##vso[task.prependpath]$(GOROOT)/bin' | ||
echo '##vso[task.prependpath]$(GOPATH)/bin' | ||
displayName: 'Create Go Workspace' |