Skip to content

Commit

Permalink
Merge pull request #21 from z4kn4fein/codecov-test
Browse files Browse the repository at this point in the history
Codecov test
  • Loading branch information
z4kn4fein authored May 30, 2017
2 parents 92840e1 + 44bbbfd commit 56c2704
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 119 deletions.
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.5.2
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# stashbox [![Appveyor build status](https://img.shields.io/appveyor/ci/pcsajtai/stashbox/master.svg?label=appveyor)](https://ci.appveyor.com/project/pcsajtai/stashbox/branch/master) [![Travis CI build status](https://img.shields.io/travis/z4kn4fein/stashbox/master.svg?label=travis-ci)](https://travis-ci.org/z4kn4fein/stashbox) [![Coverage Status](https://coveralls.io/repos/github/z4kn4fein/stashbox/badge.svg?branch=master)](https://coveralls.io/github/z4kn4fein/stashbox?branch=master) [![NuGet Version](https://buildstats.info/nuget/Stashbox)](https://www.nuget.org/packages/Stashbox/) [![MyGet package](https://img.shields.io/myget/pcsajtai/v/Stashbox.svg?label=myget)](https://www.myget.org/feed/pcsajtai/package/nuget/Stashbox)
# stashbox [![Appveyor build status](https://img.shields.io/appveyor/ci/pcsajtai/stashbox/master.svg?label=appveyor)](https://ci.appveyor.com/project/pcsajtai/stashbox/branch/master) [![Travis CI build status](https://img.shields.io/travis/z4kn4fein/stashbox/master.svg?label=travis-ci)](https://travis-ci.org/z4kn4fein/stashbox) [![Coverage Status](https://img.shields.io/codecov/c/github/z4kn4fein/stashbox.svg)](https://codecov.io/gh/z4kn4fein/stashbox) [![NuGet Version](https://buildstats.info/nuget/Stashbox)](https://www.nuget.org/packages/Stashbox/) [![MyGet package](https://img.shields.io/myget/pcsajtai/v/Stashbox.svg?label=myget)](https://www.myget.org/feed/pcsajtai/package/nuget/Stashbox)

Stashbox is a lightweight, portable dependency injection framework for .NET based solutions.

[![Join the chat at https://gitter.im/z4kn4fein/stashbox](https://img.shields.io/badge/gitter-join%20chat-1dce73.svg)](https://gitter.im/z4kn4fein/stashbox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Slack](https://img.shields.io/badge/slack-chat-orange.svg?style=flat)](https://stashbox-container.slack.com)
[![Codacy Badge](https://img.shields.io/codacy/grade/9bd55d46d34f4c2890d9ee87a89f910e.svg)](https://www.codacy.com/app/z4kn4fein/stashbox) [![Join the chat at https://gitter.im/z4kn4fein/stashbox](https://img.shields.io/badge/gitter-join%20chat-1dce73.svg)](https://gitter.im/z4kn4fein/stashbox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Slack](https://img.shields.io/badge/slack-chat-orange.svg?style=flat)](https://stashbox-slack-in.herokuapp.com/)

## Features

Expand Down
50 changes: 50 additions & 0 deletions appveyor-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
deploy:
- provider: NuGet
api_key:
secure: doqtwSE1NadH7pf4jqYifDu4tcXzsNiJtPWOccnbUrhSnIJX+5js7m8z+kV9LNJ2

- provider: GitHub
tag: $(build_version)
release: Stashbox v$(build_version)
auth_token:
secure: TaIug8cHioxT2qDznFpGtDinZiDi+20pEMQZUVAATWCvGLG9Y5LrjaxDUQtGyt38
artifact: /.*\.nupkg/

environment:
build_version: ''

image: Visual Studio 2017

configuration: Release

install:
- ps: |
$env:build_version = Get-Content ".version"
Update-AppveyorBuild -Version "${env:build_version}-${env:APPVEYOR_BUILD_NUMBER}"
before_build:
- ps: . .\patch-version.ps1 "src\stashbox\stashbox.csproj" ${env:build_version}

build_script:
- msbuild /t:Restore /p:Configuration=%CONFIGURATION% src\stashbox.sln
- msbuild /t:Build /p:Configuration=%CONFIGURATION% src\stashbox.sln

after_build:
- msbuild /t:Pack /p:IncludeSymbols=true /p:Configuration=%CONFIGURATION% /p:PackageOutputPath=..\..\artifacts src\stashbox\stashbox.csproj

artifacts:
- path: artifacts\Stashbox.*.nupkg
name: NuGet

notifications:
- provider: Email
to:
- [email protected]
on_build_success: false
on_build_failure: true
on_build_status_changed: true

- provider: Slack
auth_token:
secure: /KAOQIEOWc7w1EUl6J01qNam+f+ujntrwh53yJ0zg4qRWsdfWbkjKP2UG7tQDW7/hSVJHqF7Hz/IPdS6Cp5ilsfgH6xYroLB/sawQ/pdC5k=
channel: '#ci'
157 changes: 43 additions & 114 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,126 +1,55 @@
# master branch
-
branches:
only:
- master
deploy:
- provider: NuGet
server: https://www.myget.org/F/pcsajtai/api/v2/package
symbol_server: https://www.myget.org/F/pcsajtai/symbols/api/v2/package
api_key:
secure: 2bITagXOj2s3bTJaGXh8/iyWtST8OQOFaMM+0GAKgZts9OjCVCiV7C+E/0SYsM6M

deploy:
- provider: NuGet
api_key:
secure: doqtwSE1NadH7pf4jqYifDu4tcXzsNiJtPWOccnbUrhSnIJX+5js7m8z+kV9LNJ2
skip_tags: true

- provider: GitHub
tag: $(build_version)
release: Stashbox v$(build_version)
auth_token:
secure: TaIug8cHioxT2qDznFpGtDinZiDi+20pEMQZUVAATWCvGLG9Y5LrjaxDUQtGyt38
artifact: /.*\.nupkg/
pull_requests:
do_not_increment_build_number: true

environment:
build_version: 2.5.1
COVERALLS_REPO_TOKEN:
secure: Q9gcbZnzJ5a0YYF6mkr4QoQylIzeQmVytMnIe4WL7aPtb30SdNes7brLkvnXOirt
image: Visual Studio 2017

version: $(build_version)-{build}

skip_tags: true
configuration: Release

pull_requests:
do_not_increment_build_number: true

image: Visual Studio 2017

configuration: Release

before_build:
- ps: . .\patch-version.ps1 "src\stashbox\stashbox.csproj" $($env:build_version)

build_script:
- msbuild /t:Restore /p:Configuration=%CONFIGURATION% src\stashbox.sln
- msbuild /t:Build /p:Configuration=%CONFIGURATION% src\stashbox.sln

after_build:
- msbuild /t:Pack /p:IncludeSymbols=true /p:Configuration=%CONFIGURATION% /p:PackageOutputPath=..\..\artifacts src\stashbox\stashbox.csproj

test_script:
- ps: . .\set-debug-type.ps1 "src\stashbox\stashbox.csproj"
- dotnet test src\stashbox.tests\stashbox.tests.csproj -f net45 -c %CONFIGURATION% --no-build
- dotnet test src\stashbox.tests\stashbox.tests.csproj -f netcoreapp1.0 -c %CONFIGURATION% --no-build
- ps: . .\coverage.ps1

artifacts:
- path: artifacts\Stashbox.*.nupkg
name: NuGet

notifications:
- provider: Email
to:
- [email protected]
on_build_success: false
on_build_failure: true
on_build_status_changed: true
install:
- ps: |
$ver = Get-Content ".version"
Update-AppveyorBuild -Version "$ver-preview-${env:APPVEYOR_BUILD_NUMBER}"
- provider: Slack
auth_token:
secure: /KAOQIEOWc7w1EUl6J01qNam+f+ujntrwh53yJ0zg4qRWsdfWbkjKP2UG7tQDW7/hSVJHqF7Hz/IPdS6Cp5ilsfgH6xYroLB/sawQ/pdC5k=
channel: '#ci'
before_build:
- ps: . .\patch-version.ps1 "src\stashbox\stashbox.csproj" ${env:APPVEYOR_BUILD_VERSION}

# every branch except master
-
branches:
except:
- master
build_script:
- msbuild /t:Restore /p:Configuration=%CONFIGURATION% src\stashbox.sln
- msbuild /t:Build /p:Configuration=%CONFIGURATION% src\stashbox.sln

deploy:
- provider: NuGet
server: https://www.myget.org/F/pcsajtai/api/v2/package
skip_symbols: true
api_key:
secure: 2bITagXOj2s3bTJaGXh8/iyWtST8OQOFaMM+0GAKgZts9OjCVCiV7C+E/0SYsM6M
after_build:
- msbuild /t:Pack /p:IncludeSymbols=true /p:Configuration=%CONFIGURATION% /p:PackageOutputPath=..\..\artifacts src\stashbox\stashbox.csproj

environment:
build_version: 2.5.1
COVERALLS_REPO_TOKEN:
secure: Q9gcbZnzJ5a0YYF6mkr4QoQylIzeQmVytMnIe4WL7aPtb30SdNes7brLkvnXOirt
test_script:
- dotnet test src\stashbox.tests\stashbox.tests.csproj -f net45 -c %CONFIGURATION% --no-build
- dotnet test src\stashbox.tests\stashbox.tests.csproj -f netcoreapp1.0 -c %CONFIGURATION% --no-build

version: $(build_version)-preview-{build}
after_test:
- ps: . .\set-debug-type.ps1 "src\stashbox\stashbox.csproj"
- ps: . .\coverage.ps1

pull_requests:
do_not_increment_build_number: true

image: Visual Studio 2017

configuration: Release

before_build:
- ps: . .\patch-version.ps1 "src\stashbox\stashbox.csproj" $($env:APPVEYOR_BUILD_VERSION)

build_script:
- msbuild /t:Restore /p:Configuration=%CONFIGURATION% src\stashbox.sln
- msbuild /t:Build /p:Configuration=%CONFIGURATION% src\stashbox.sln

after_build:
- msbuild /t:Pack /p:IncludeSymbols=true /p:Configuration=%CONFIGURATION% /p:PackageOutputPath=..\..\artifacts src\stashbox\stashbox.csproj

test_script:
- ps: . .\set-debug-type.ps1 "src\stashbox\stashbox.csproj"
- dotnet test src\stashbox.tests\stashbox.tests.csproj -f net45 -c %CONFIGURATION% --no-build
- dotnet test src\stashbox.tests\stashbox.tests.csproj -f netcoreapp1.0 -c %CONFIGURATION% --no-build
- ps: . .\coverage.ps1

artifacts:
- path: artifacts\Stashbox.*.nupkg
name: NuGet

notifications:
- provider: Email
to:
- [email protected]
on_build_success: false
on_build_failure: true
on_build_status_changed: true
artifacts:
- path: artifacts\Stashbox.*.nupkg
name: NuGet

- provider: Slack
auth_token:
secure: /KAOQIEOWc7w1EUl6J01qNam+f+ujntrwh53yJ0zg4qRWsdfWbkjKP2UG7tQDW7/hSVJHqF7Hz/IPdS6Cp5ilsfgH6xYroLB/sawQ/pdC5k=
channel: '#ci'
notifications:
- provider: Email
to:
- [email protected]
on_build_success: false
on_build_failure: true
on_build_status_changed: true

- provider: Slack
auth_token:
secure: /KAOQIEOWc7w1EUl6J01qNam+f+ujntrwh53yJ0zg4qRWsdfWbkjKP2UG7tQDW7/hSVJHqF7Hz/IPdS6Cp5ilsfgH6xYroLB/sawQ/pdC5k=
channel: '#ci'
7 changes: 4 additions & 3 deletions coverage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
exit 0
}

nuget install coveralls.net -Version 0.7.0 -OutputDirectory .\tools
nuget install OpenCover -Version 4.6.519 -OutputDirectory .\tools
nuget install ReportGenerator -Version 2.5.2 -OutputDirectory .\tools

$openCoverPath = Join-Path $PSScriptRoot "tools\OpenCover.4.6.519\tools\OpenCover.Console.exe"
$coverallsPath = Join-Path $PSScriptRoot "tools\coveralls.net.0.7.0\tools\csmacnz.Coveralls.exe"
$reportGeneratorPath = Join-Path $PSScriptRoot "tools\ReportGenerator.2.5.2\tools\ReportGenerator.exe"
$testPath = Join-Path $PSScriptRoot "src\stashbox.tests\stashbox.tests.csproj"
$coverageReportDir = Join-Path $PSScriptRoot "coverageresults"

$env:Path += ";c:\Python34;C:\Python34\Scripts"

$arguments = "-returntargetcode", "-register:user", "`"-filter:+[*]Stashbox.* -[Stashbox.Tests]* -[Stashbox]*.Utils* -[Stashbox]*.Expressions.Compile*`"", "-target:dotnet.exe", "`"-targetargs:test $testPath -f net45 -c Release`"", "-output:coverage.xml", "-skipautoprops", "-hideskipped:All"
. $openCoverPath $arguments
. $coverallsPath --opencover -i coverage.xml
. pip install codecov
. codecov -f coverage.xml -X gcov
. $reportGeneratorPath -verbosity:Info -reports:coverage.xml -targetdir:$coverageReportDir "-assemblyfilters:-Stashbox.Tests*"

0 comments on commit 56c2704

Please sign in to comment.