Skip to content

Commit

Permalink
Merge pull request #2 from BindToConfig/azure-pipelines
Browse files Browse the repository at this point in the history
Azure pipelines
  • Loading branch information
alhugone committed Dec 19, 2018
2 parents bc76730 + 24725e6 commit 7d78421
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://raw.githubusercontent.com/BindToConfig/BindToConfig/master/LICENSE)
[![Documentation Status](https://readthedocs.org/projects/bindtoconfig/badge/?version=latest)](https://bindtoconfig.readthedocs.io/en/latest/?badge=latest)

[![Coverage Status](https://coveralls.io/repos/github/BindToConfig/BindToConfig/badge.svg?branch=)](https://coveralls.io/github/BindToConfig/BindToConfig?branch=master)
[![Build Status](https://dev.azure.com/BindToConfig/BindToConfig/_apis/build/status/BindToConfig.BindToConfig?branchName=master)](https://dev.azure.com/BindToConfig/BindToConfig/_build/latest?definitionId=1?branchName=master)

# BindToConfig .Net Core
***BindToConfig*** is a simple and lightweight alternative to ***.NET Core Options***, that doesn't require any additional interface implemented by classes.
Focused on simplicity and good practices, promotes creating many small, clean, immutable classes that are a representation of application's configuration which lifetime scope and binding to the configuration are set in composition root and not directly by dependent classes.
Expand Down
29 changes: 29 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
trigger:
- master

pool:
vmImage: 'VS2017-Win2016'

variables:
- group: BindToConfig
- name: buildConfiguration
value: 'Debug'
- name: coverallsToken
value: $(coverallsRepoToken)

steps:
- script: dotnet build src\ --configuration $(buildConfiguration)
displayName: 'Build $(buildConfiguration)'
- task: BatchScript@1
displayName: 'Test Coverage'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
filename: test-coverage.bat
env:
commitId: $(Build.SourceVersion)
commitBranch: $(Build.SourceBranchName)
commitAuthor: $(Build.RequestedFor)
commitEmail: $(Build.RequestedForEmail)
commitMessage: $(Build.SourceVersionMessage)
jobId: $(Agent.Id)
coverallsToken: $(coverallsToken)
6 changes: 6 additions & 0 deletions test-coverage.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dotnet tool install --tool-path tools coverlet.console
dotnet tool install --tool-path tools dotnet-reportgenerator-globaltool
dotnet tool install --tool-path tools coveralls.net
tools\coverlet "src\BindToConfig.UnitTests\bin\Debug\netcoreapp2.1\BindToConfig.UnitTests.dll" --target "dotnet" --targetargs "test src\BindToConfig.UnitTests\BindToConfig.UnitTests.csproj --no-build" -f opencover
tools\reportgenerator "-reports:coverage.opencover.xml" "-targetdir:coveragereport"
tools\csmacnz.coveralls --opencover -i coverage.opencover.xml --repoToken %coverallsToken% --commitId %commitId% --commitBranch %commitBranch% --commitAuthor "%commitAuthor%" --commitEmail %commitEmail% --commitMessage "%commitMessage%" --jobId %jobId%

0 comments on commit 7d78421

Please sign in to comment.