Skip to content

Commit 0a0cda3

Browse files
chore(ci): build with dotnet not VS
1 parent 6c76a15 commit 0a0cda3

File tree

2 files changed

+30
-16
lines changed

2 files changed

+30
-16
lines changed

.nuget/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="coveralls.net" version="0.6.0" />
4-
<package id="OpenCover" version="4.6.210-rc" />
4+
<package id="OpenCover" version="4.6.519" />
55
<package id="msdn.4.5.2" version="0.1.0-alpha-1611021200" />
66
</packages>

appveyor.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# gitversion will change the version number
22
version: x-{build}
33

4+
# branches to build
5+
branches:
6+
# blacklist
7+
except:
8+
- gh-pages
9+
410
configuration: Release
5-
os: Visual Studio 2015
11+
os: Visual Studio 2017
612

713
init:
814
- git config --global core.autocrlf input
@@ -25,7 +31,8 @@ environment:
2531
# tools we need for bulding/testing/deploying
2632
install:
2733
- choco install gitversion.portable -pre -y
28-
- npm install gh-pages -g
34+
- nuget update -self
35+
#- npm install gh-pages -g
2936

3037
# - nuget install secure-file -ExcludeVersion
3138
# - if defined snk_secret secure-file\tools\secure-file -decrypt src\ipfs.ci.snk.enc -secret %snk_secret% -out src\ipfs.dev.snk
@@ -36,30 +43,37 @@ install:
3643
# gitversion will change the assembly info
3744
pull_requests:
3845
do_not_increment_build_number: true
39-
assembly_info:
40-
patch: false
4146

4247
before_build:
4348
- nuget restore
4449
- ps: gitversion /output buildserver /updateAssemblyInfo >gitversion.log
4550

46-
build:
47-
project: IpfsApi.sln
48-
publish_nuget: false
49-
verbosity: minimal
51+
build_script:
52+
- dotnet build -c %CONFIGURATION% -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_MajorMinorPatch%
53+
- dotnet pack -c %CONFIGURATION% --no-build --no-restore -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_MajorMinorPatch%
5054

5155
after_build:
56+
- cmd: appveyor PushArtifact "src\bin\%CONFIGURATION%\Ipfs.Core.%GitVersion_MajorMinorPatch%.nupkg"
5257
# Build documentation in doc\_site
53-
- tools\docfx\docfx doc\docfx.json
54-
- if defined git_token gh-pages -d doc\_site -m "new docs %GitVersion_FullSemVer%"
55-
# Build the nuget package
56-
- nuget pack src\IpfsApi.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
57-
- appveyor PushArtifact "Ipfs.Api.%GitVersion_NuGetVersion%.nupkg"
58+
# - tools\docfx\docfx doc\docfx.json
59+
# - if defined git_token gh-pages -d doc\_site -m "new docs %GitVersion_FullSemVer%"
60+
61+
test_script:
62+
- dotnet test -c %CONFIGURATION% --no-build --no-restore test
5863

5964
after_test:
6065
# Generate coverage report
61-
- packages\OpenCover.4.6.210-rc\tools\OpenCover.Console.exe -register:user -filter:"+[Ipfs.Api*]* -[*Tests]*" -target:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe" -targetargs:"/testcontainer:test//bin/Release/Ipfs.Api.Tests.dll" -output:coverage.xml
62-
- if defined COVERALLS_REPO_TOKEN packages\coveralls.net.0.6.0\tools\csmacnz.coveralls.exe --opencover -i ./coverage.xml --serviceName appveyor --jobId %APPVEYOR_BUILD_NUMBER%
66+
- packages\OpenCover.4.6.519\tools\OpenCover.Console.exe
67+
-register:user -filter:"+[Ipfs.Api*]* -[*Tests]*"
68+
-target:"c:\Program Files\dotnet\dotnet.exe"
69+
-targetargs:"test -c Release --no-build --no-restore test"
70+
-output:coverage.xml
71+
-mergeoutput
72+
-hideskipped:File
73+
-oldStyle
74+
- if defined COVERALLS_REPO_TOKEN
75+
packages\coveralls.net.0.6.0\tools\csmacnz.coveralls.exe
76+
--opencover -i ./coverage.xml --useRelativePaths --serviceName appveyor --jobId %APPVEYOR_BUILD_NUMBER%
6377

6478
# publish NuGet package on tag build
6579
nuget:

0 commit comments

Comments
 (0)