-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathappveyor.yml
50 lines (35 loc) · 1.89 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: '{build}'
image: Visual Studio 2022
configuration: Release
skip_non_tags: true
pull_requests:
do_not_increment_build_number: true
environment:
COVERALLS_REPO_TOKEN:
secure: /xeQOWRDMuzkPwbXWh+I61k/c+0umMsf5c1Jwfol/AlmChLMgwZXLHm2yE7gyJ5Q
nuget:
disable_publish_on_pr: true
build_script:
- cmd: dotnet build -c Release
test_script:
- ps: >-
dotnet tool install coveralls.net --version 4.0.1 --tool-path tools
dotnet test Casbin.NET.Watcher.Redis.UnitTests/Casbin.NET.Watcher.Redis.UnitTests.csproj --configuration Release --collect "Code coverage" --settings CodeCoverage.runsettings --results-directory TestResults
$packages = ((dotnet nuget locals global-packages --list) -split "packages: ")[1]
Write-Host Nuget cache : $packages
$codecoverage = (Get-ChildItem -Path $packages\microsoft.codecoverage CodeCoverage.exe -Recurse | Select -Last 1).FullName
Write-Host codecoverage tool :$codecoverage
$coverageFilePath = Resolve-Path -path "TestResults\*\*.coverage"
Write-Host coverage file : $coverageFilePath
& $codecoverage analyze /output:TestResults/output.xml $coverageFilePath
Test-Path TestResults/output.xml
Write-Host coveralls.net config : $env:APPVEYOR_REPO_BRANCH, $env:APPVEYOR_REPO_COMMIT, $env:APPVEYOR_JOB_ID
$coveralls = ".\tools\csmacnz.coveralls.exe"
& $coveralls --dynamiccodecoverage -i ./TestResults/output.xml --repoToken $env:COVERALLS_REPO_TOKEN --useRelativePaths --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID
artifacts:
- path: 'Casbin.NET.Watcher.Redis\**\*.nupkg'
deploy:
provider: NuGet
api_key:
secure: 9COz0H55FQYBR7Hi7mAfWQe2JprfnmYimCxR4YvkVkPGZB9LK6UAy92vumXMqqJ+
skip_symbols: false