Skip to content

Commit

Permalink
Merge pull request #28 from PCLExt/devel
Browse files Browse the repository at this point in the history
Enhanced AppVeyor
  • Loading branch information
Aragas authored Jul 3, 2018
2 parents ee6ce06 + 9538d6e commit 4224d6c
Show file tree
Hide file tree
Showing 10 changed files with 306 additions and 78 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**Mono & .NET Core:** | **.NET 4.5 & .NET Core:** | **NuGet** | **Coveralls** | **Codecov**
------------ | ------------- | ------------- | ------------- | -------------
| [![Build Status](https://travis-ci.org/PCLExt/PCLExt.FileStorage.svg?branch=master)](https://travis-ci.org/PCLExt/PCLExt.FileStorage) | [![Build status](https://ci.appveyor.com/api/projects/status/puku2ym0k1n7ryde?svg=true)](https://ci.appveyor.com/project/Aragas/pclext-filestorage) [![AppVeyor tests](https://img.shields.io/appveyor/tests/Aragas/pclext-filestorage.svg)]() | [![NuGet](https://img.shields.io/nuget/v/PCLExt.FileStorage.svg)](https://www.nuget.org/packages/PCLExt.FileStorage/) | [![Coverage Status](https://coveralls.io/repos/github/PCLExt/PCLExt.FileStorage/badge.svg?branch=master)](https://coveralls.io/github/PCLExt/PCLExt.FileStorage?branch=master) | [![codecov](https://codecov.io/gh/PCLExt/PCLExt.FileStorage/branch/master/graph/badge.svg)](https://codecov.io/gh/PCLExt/PCLExt.FileStorage)
**Mono & .NET Core:** | **.NET 4.5 & .NET Core:** | **NuGet** |**NuGet devel** | **Coveralls** | **Codecov**
------------ | ------------- | ------------- | ------------- | ------------- | -------------
| [![Build Status](https://travis-ci.org/PCLExt/PCLExt.FileStorage.svg?branch=master)](https://travis-ci.org/PCLExt/PCLExt.FileStorage) | [![Build status](https://ci.appveyor.com/api/projects/status/puku2ym0k1n7ryde?svg=true)](https://ci.appveyor.com/project/Aragas/pclext-filestorage) [![AppVeyor tests](https://img.shields.io/appveyor/tests/Aragas/pclext-filestorage.svg)]() | [![NuGet](https://img.shields.io/nuget/v/PCLExt.FileStorage.svg)](https://www.nuget.org/packages/PCLExt.FileStorage/) | [![NuGet devel](https://img.shields.io/nuget/v/PCLExt.FileStorage-devel.svg)](https://www.nuget.org/packages/PCLExt.FileStorage-devel/) | [![Coverage Status](https://coveralls.io/repos/github/PCLExt/PCLExt.FileStorage/badge.svg?branch=master)](https://coveralls.io/github/PCLExt/PCLExt.FileStorage?branch=master) | [![codecov](https://codecov.io/gh/PCLExt/PCLExt.FileStorage/branch/master/graph/badge.svg)](https://codecov.io/gh/PCLExt/PCLExt.FileStorage)

# PCLExt.FileStorage

Expand Down
19 changes: 19 additions & 0 deletions after_build_docfx.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -and $env:CONFIGURATION -eq "Release") # is not a pull request
{
CD docs
& docfx docfx.json
if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}

git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):[email protected]`n"
git config --global user.email $env:op_build_user_email
git config --global user.name $env:op_build_user
git clone https://github.com/$($env:APPVEYOR_REPO_NAME).git -b gh-pages origin_site -q
Copy-Item origin_site/.git _site -recurse
CD _site
git add -A 2>&1
git commit -m "CI Updates" -q
git push origin gh-pages -q
}
17 changes: 17 additions & 0 deletions after_test_fx_core.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# PCLExt.FileStorage.Core.Test
choco install codecov
dotnet tool install -g coveralls.net
CD $env:APPVEYOR_BUILD_FOLDER
CD test\PCLExt.FileStorage.Core.Test
dotnet add package coverlet.msbuild
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[NUnit*]*
csmacnz.coveralls --opencover -i coverage.opencover.xml --repoToken $env:COVERALLS_REPO_TOKEN
codecov -f coverage.opencover.xml

# PCLExt.FileStorage.NetFX.Test
CD $env:APPVEYOR_BUILD_FOLDER
nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
nuget install NUnit.ConsoleRunner -Version 3.8.0 -OutputDirectory tools
.\tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -filter:"+[PCLExt.*]* -[PCLExt.FileStorage.NetFX.Test]*" -register:user -target:".\tools\NUnit.ConsoleRunner.3.8.0\tools\nunit3-console.exe" -targetargs:"/domain:single test/PCLExt.FileStorage.NetFX.Test/bin/Debug/PCLExt.FileStorage.NetFX.Test.dll" -output:coverage_netfx.xml
csmacnz.coveralls --opencover -i coverage_netfx.xml --repoToken $env:COVERALLS_REPO_TOKEN
codecov -f coverage_netfx.xml
8 changes: 8 additions & 0 deletions after_test_nuget-devel.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if($env:CONFIGURATION -eq "Release") # is not a pull request
{
cd $env:APPVEYOR_BUILD_FOLDER
cd common
nuget pack PCLExt.FileStorage-devel.nuspec -Version $env:APPVEYOR_BUILD_VERSION
$nupkg = (Get-ChildItem PCLExt.FileStorage-devel*.nupkg)[0];
Push-AppveyorArtifact $nupkg.FullName -FileName $nupkg.Name -DeploymentName "PCLExt.FileStorage-devel.nupkg";
}
8 changes: 8 additions & 0 deletions after_test_nuget.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if($env:CONFIGURATION -eq "Release" -and $env:APPVEYOR_REPO_TAG -eq "true")
{
cd $env:APPVEYOR_BUILD_FOLDER
cd common
nuget pack PCLExt.FileStorage.nuspec -Version $env:APPVEYOR_BUILD_VERSION
$nupkg = (Get-ChildItem PCLExt.FileStorage*.nupkg)[0];
Push-AppveyorArtifact $nupkg.FullName -FileName $nupkg.Name -DeploymentName "PCLExt.FileStorage.nupkg";
}
246 changes: 178 additions & 68 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,186 @@
os: Visual Studio 2017
########################################################
## MASTER ##
########################################################
-
branches:
only:
- master

configuration:
- Debug
- Release
platform: Any CPU

environment:
COVERALLS_REPO_TOKEN:
os: Visual Studio 2017
configuration:
- Debug
- Release
platform: Any CPU
version: 1.4.1.{build}

skip_commits:
files:
- docs/*
- LICENSE
- README.md
- .travis.yml
- .gitignore

cache:
- packages -> **\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml

environment:
COVERALLS_REPO_TOKEN:
secure: q5xCVqG+/0ByXEFTGYgf1lCWwrOqq35br6CzLf5MPKMD2L8VboA10tKcRfW2n/70
op_build_user: "OpenPublishBuild"
op_build_user_email: "[email protected]"
access_token:
secure: GQ3IuQcROfrBh1zCm97nDduFgUcaK9uD4xbawJx5iKcx5IvP7dEahe16nmwF+fQE

cache:
- packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
op_build_user: "OpenPublishBuild"
op_build_user_email: "[email protected]"
access_token:
secure: GQ3IuQcROfrBh1zCm97nDduFgUcaK9uD4xbawJx5iKcx5IvP7dEahe16nmwF+fQE

install:
- git submodule update --init --recursive

before_build:
- nuget restore
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
assembly_info:
patch: true
file: common\CommonAssemblyInfo.cs
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}"

init:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
git checkout $env:APPVEYOR_REPO_BRANCH -q
choco install docfx -y
# choco install nuget.commandline -y
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME)"
}
install:
- git submodule update --init --recursive

before_build:
- nuget restore
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./before_build_docfx.ps1

build:
project: PCLExt.FileStorage.sln
verbosity: minimal

after_build:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_build_docfx.ps1

after_test:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_fx_core.ps1
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_nuget.ps1


deploy:
provider: NuGet
api_key:
secure: yoZtG3i28wVuNDk1HrGW/t3tsgt3Ru/Yk/y/sOzUHRc2WVZlynVdWSHK/Bp0uShJ
skip_symbols: false
artifact: PCLExt.FileStorage.nupkg
on:
configuration: Release
APPVEYOR_REPO_TAG: true


build:
project: PCLExt.FileStorage.sln
verbosity: minimal
########################################################
## DEVELOPMENT ##
########################################################
-
branches:
only:
- devel

os: Visual Studio 2017
configuration:
- Debug
- Release
platform: Any CPU
version: 1.4.1.{build}

after_build:
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
CD docs
& docfx docfx.json
if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):[email protected]`n"
git config --global user.email $env:op_build_user_email
git config --global user.name $env:op_build_user
git clone https://github.com/PCLExt/PCLExt.FileStorage.git -b gh-pages origin_site -q
Copy-Item origin_site/.git _site -recurse
CD _site
git add -A 2>&1
git commit -m "CI Updates" -q
git push origin gh-pages -q
}
skip_commits:
files:
- docs/*
- LICENSE
- README.md
- .travis.yml
- .gitignore

cache:
- packages -> **\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml

environment:
COVERALLS_REPO_TOKEN:
secure: q5xCVqG+/0ByXEFTGYgf1lCWwrOqq35br6CzLf5MPKMD2L8VboA10tKcRfW2n/70

assembly_info:
patch: true
file: common\CommonAssemblyInfo.cs
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}-devel"

install:
- git submodule update --init --recursive

before_build:
- nuget restore

build:
project: PCLExt.FileStorage.sln
verbosity: minimal

after_test:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_fx_core.ps1
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_nuget-devel.ps1

deploy:
provider: NuGet
api_key:
secure: yoZtG3i28wVuNDk1HrGW/t3tsgt3Ru/Yk/y/sOzUHRc2WVZlynVdWSHK/Bp0uShJ
skip_symbols: false
artifact: PCLExt.FileStorage-devel.nupkg
on:
configuration: Release

after_test:
- choco install codecov
- dotnet tool install -g coveralls.net
#netcore
- cd %APPVEYOR_BUILD_FOLDER%
- cd test\PCLExt.FileStorage.Core.Test
- dotnet add package coverlet.msbuild
- dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[NUnit*]*
- csmacnz.coveralls --opencover -i coverage.opencover.xml --repoToken %COVERALLS_REPO_TOKEN%
- codecov -f "coverage.opencover.xml"
#netfx
- cd %APPVEYOR_BUILD_FOLDER%
- nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
- nuget install NUnit.ConsoleRunner -Version 3.8.0 -OutputDirectory tools
- .\tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -filter:"+[PCLExt.*]* -[PCLExt.FileStorage.NetFX.Test]*" -register:user -target:".\tools\NUnit.ConsoleRunner.3.8.0\tools\nunit3-console.exe" -targetargs:"/domain:single test/PCLExt.FileStorage.NetFX.Test/bin/Debug/PCLExt.FileStorage.NetFX.Test.dll" -output:coverage_netfx.xml
- csmacnz.coveralls --opencover -i coverage_netfx.xml --repoToken %COVERALLS_REPO_TOKEN%
- codecov -f coverage_netfx.xml

########################################################
## ANY OTHER BRANCH ##
########################################################
-
os: Visual Studio 2017
configuration:
- Release
- Debug
platform: Any CPU

skip_commits:
files:
- docs/*
- LICENSE
- README.md
- .travis.yml
- .gitignore

cache:
- packages -> **\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml

install:
- git submodule update --init --recursive

before_build:
- nuget restore

build:
project: PCLExt.FileStorage.sln
verbosity: minimal

after_test:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: ./after_test_fx_core.ps1
5 changes: 5 additions & 0 deletions before_build_docfx.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -and $env:CONFIGURATION -eq "Release") # is not a pull request
{
git checkout $env:APPVEYOR_REPO_BRANCH -q
choco install docfx -y
}
5 changes: 3 additions & 2 deletions common/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("1.4.1.0")]
[assembly: AssemblyFileVersion("1.4.1.0")]
[assembly: AssemblyVersion("1.4.1.1")]
[assembly: AssemblyFileVersion("1.4.1.1")]
[assembly: AssemblyInformationalVersion("1.4.1.1")]
Loading

0 comments on commit 4224d6c

Please sign in to comment.