Skip to content

Commit

Permalink
Merge pull request #4 from aguacongas/develop
Browse files Browse the repository at this point in the history
release 1.2
  • Loading branch information
aguacongas authored Dec 10, 2018
2 parents 233f4f7 + 610d6f8 commit 4215f61
Show file tree
Hide file tree
Showing 56 changed files with 822 additions and 105 deletions.
2 changes: 2 additions & 0 deletions Aguacongas.Identity.Redis.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
build.cmd = build.cmd
build.ps1 = build.ps1
CHANGELOG.md = CHANGELOG.md
dotnet-install.ps1 = dotnet-install.ps1
global.json = global.json
LICENSE = LICENSE
publish.cmd = publish.cmd
publish.ps1 = publish.ps1
Expand Down
9 changes: 9 additions & 0 deletions Aguacongas.Identity.Redis.sln.licenseheader
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extensions: designer.cs generated.cs
extensions: .cs .cpp .h
// Project: aguacongas/Identity.Redis
// Copyright (c) 2018 @Olivier Lefebvre
extensions: .xml .config .xsd
<!--
Project: aguacongas/Identity.Redis
Copyright (c) 2018 @Olivier Lefebvre
-->
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ This logger write traces, (LogLevel = `LogLevel.Trace`), to enable it add a fil

The sample is a copy of [IdentitySample.Mvc](https://github.com/aspnet/Identity/tree/dev/samples/IdentitySample.Mvc) sample using a Redis database.

## Tests

This library is tested using [Microsoft.AspNetCore.Identity.Specification.Tests](https://www.nuget.org/packages/Microsoft.AspNetCore.Identity.Specification.Tests/), the shared test suite for Asp.Net Identity Core store implementations.
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ branches:
- gh-pages
image:
- Ubuntu
- Visual Studio 2017 Preview
- Visual Studio 2017
environment:
access_token:
secure: yQcU3EbE3/jaIhwn6e+n76xzcQ+tGXXdIZAmA3Z8ssj5IEYPehthJkLYhhNEmw21
Expand All @@ -17,15 +17,15 @@ install:
- sh: sudo dpkg -i packages-microsoft-prod.deb
- sh: sudo apt-get -y install apt-transport-https
- sh: sudo apt-get update
- sh: sudo apt-get -y install dotnet-sdk-2.1
- sh: sudo apt-get -y install dotnet-sdk-2.2
- sh: sudo apt -y install nuget
- sh: nuget install GitVersion.CommandLine -ExcludeVersion
- sh: mono GitVersion.CommandLine/tools/GitVersion.exe /l console /output buildserver
- ps: if ($isWindows) { .\dotnet-install.ps1 -Version 2.2.100 }
- cmd: gitversion /l console /output buildserver
- cmd: nuget install redis-64 -excludeversion
- cmd: redis-64\tools\redis-server.exe --service-install
- cmd: redis-64\tools\redis-server.exe --service-start
- cmd: nuget install JetBrains.dotCover.CommandLineTools -ExcludeVersion
- cmd: nuget install ReportGenerator -ExcludeVersion
- dotnet restore
build_script:
Expand Down
80 changes: 38 additions & 42 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,43 +1,39 @@
$result = 0

if ($isLinux) {
gci -rec `
| ? { $_.Name -like "*.IntegrationTest.csproj" `
-Or $_.Name -like "*.Test.csproj" `
} `
| % {
cd $_.DirectoryName
dotnet test

if ($LASTEXITCODE -ne 0) {
$result = $LASTEXITCODE
}
}
} else {
$merge = ""
gci -rec `
| ? { $_.Name -like "*.IntegrationTest.csproj" `
-Or $_.Name -like "*.Test.csproj" `
} `
| % {
$testArgs = "test " + $_.FullName
Write-Host "testargs" $testArgs
Write-Host "coveragefile" $coveragefile
JetBrains.dotCover.CommandLineTools\tools\dotCover.exe cover /TargetExecutable="C:\Program Files\dotnet\dotnet.exe" /TargetArguments="$testArgs" /Filters="-:*.Test;-:*.IntegrationTest;-:xunit.*;-:MSBuild;-:Moq;-:StackExchange.*" /Output="$_.snapshot"

if ($LASTEXITCODE -ne 0) {
$result = $LASTEXITCODE
}

$merge = $merge + $_.Name + ".snapshot;"
}

Write-Host "merge " $merge
JetBrains.dotCover.CommandLineTools\tools\dotCover.exe merge /Source="$merge" /Output="coverage\coverage.snapshot"
JetBrains.dotCover.CommandLineTools\tools\dotCover.exe report /Source="coverage\coverage.snapshot" /Output="coverage\docs\index.html" /ReportType="HTML"
JetBrains.dotCover.CommandLineTools\tools\dotCover.exe report /Source="coverage\coverage.snapshot" /Output="coverage\coverage.xml" /ReportType="DetailedXML"

ReportGenerator\tools\ReportGenerator.exe "-reports:coverage\coverage.xml" "-targetdir:coverage\docs" "-reporttypes:Badges"
}
exit $result
$result = 0

if ($isLinux) {
gci -rec `
| ? { $_.Name -like "*.IntegrationTest.csproj" `
-Or $_.Name -like "*.Test.csproj" `
} `
| % {
cd $_.DirectoryName
dotnet test

if ($LASTEXITCODE -ne 0) {
$result = $LASTEXITCODE
}
}
} else {
gci -rec `
| ? { $_.Name -like "*.IntegrationTest.csproj" `
-Or $_.Name -like "*.Test.csproj" `
} `
| % {
&('dotnet') ('test', $_.FullName, '--logger', "trx;LogFileName=$_.trx", '-c', 'Release', '/p:CollectCoverage=true', '/p:CoverletOutputFormat=cobertura')
if ($LASTEXITCODE -ne 0) {
$result = $LASTEXITCODE
}
}

$merge = ""
gci -rec `
| ? { $_.Name -like "coverage.cobertura.xml" } `
| % {
$path = $_.FullName
$merge = "$merge;$path"
}
Write-Host $merge
ReportGenerator\tools\net47\ReportGenerator.exe "-reports:$merge" "-targetdir:coverage\docs" "-reporttypes:HtmlInline;Badges"
}
exit $result

Loading

0 comments on commit 4215f61

Please sign in to comment.