This repository has been archived by the owner on May 9, 2022. It is now read-only.
forked from nmklotas/GitLabApiClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI integration * Fix tests * Add coverage reporting * Add tests script * Add badge * Don't generate package on build
- Loading branch information
Showing
8 changed files
with
108 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -258,4 +258,7 @@ paket-files/ | |
|
||
# Python Tools for Visual Studio (PTVS) | ||
__pycache__/ | ||
*.pyc | ||
*.pyc | ||
|
||
# Coverage files | ||
coverage/ |
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<activePackageSource> | ||
<add key="NuGet official package source" value="https://nuget.org/api/v2/" /> | ||
</activePackageSource> | ||
</configuration> |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# GitLabApiClient | ||
[](https://codecov.io/gh/nmklotas/GitLabApiClient) | ||
GitLab API client |
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,33 @@ | ||
image: Visual Studio 2017 | ||
version: 1.0.{build}-alpha | ||
configuration: Release | ||
build: | ||
verbosity: minimal | ||
|
||
environment: | ||
# Don't report back to the mothership | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
|
||
|
||
skip_branch_with_pr: true | ||
|
||
build_script: | ||
- cmd: dotnet restore GitLabApiClient.sln | ||
- cmd: dotnet build src\GitLabApiClient\GitLabApiClient.csproj -c Release | ||
- cmd: dotnet pack src\GitLabApiClient\GitLabApiClient.csproj -c Release --no-build | ||
|
||
test_script: | ||
- ps: .\test.ps1 | ||
|
||
artifacts: | ||
- path: 'src\bin\Release\*.nupkg' | ||
name: Package | ||
|
||
deploy: | ||
provider: NuGet | ||
api_key: | ||
secure: yQCX8RMr2+lMMwXS1dVF/hIi1xsEOXoEqxzmrnvdSlXS1g5vHyrEoZG+Lq+RvekE | ||
skip_symbols: false | ||
artifact: /.*\.nupkg/ | ||
on: | ||
appveyor_repo_tag: true |
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,38 @@ | ||
nuget install -Verbosity quiet -OutputDirectory packages -Version 4.6.519 OpenCover | ||
nuget install -Verbosity quiet -OutputDirectory packages -Version 2.4.5.0 ReportGenerator | ||
nuget install -Verbosity quiet -OutputDirectory packages -Version 1.0.3 CodeCov | ||
|
||
$coverageFolder = "$PSScriptRoot\coverage" | ||
Remove-Item $coverageFolder -force -recurse -ErrorAction SilentlyContinue | Out-Null | ||
New-Item $coverageFolder -type directory | Out-Null | ||
|
||
$openCover="$PSScriptRoot\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe" | ||
$reportGenerator="$PSScriptRoot\packages\ReportGenerator.2.4.5.0\tools\ReportGenerator.exe" | ||
$codeCov = "$PSScriptRoot\packages\CodeCov.1.0.3\tools\codecov.exe" | ||
|
||
Write-Host "Calculating coverage with OpenCover." | ||
& $openCover ` | ||
-target:"c:\Program Files\dotnet\dotnet.exe" ` | ||
-targetargs:"test test\GitLabApiClient.Test\GitLabApiClient.Test.csproj" ` | ||
-mergeoutput ` | ||
-hideskipped:File ` | ||
-output:coverage/coverage.xml ` | ||
-oldStyle ` | ||
-filter:"+[GitLabApiClient*]* -[GitLabApiClient.Test]*" ` | ||
-searchdirs:$test/bin/Debug/netcoreapp2.0 ` | ||
-returntargetcode ` | ||
-register:user | Write-Host | ||
|
||
if ($LastExitCode -ne 0) | ||
{ | ||
exit 1 | ||
} | ||
|
||
Write-Host "Generating HTML report" | ||
& $reportGenerator ` | ||
-reports:coverage/coverage.xml ` | ||
-targetdir:coverage ` | ||
-verbosity:Error | Write-Host | ||
|
||
Write-Host "Uploading coverage file" | ||
& $codecov -f "coverage/coverage.xml" -t bda1c835-c4a2-4a1a-8d38-999b9a8ea80b |
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