Skip to content

Commit de686de

Browse files
committed
Make unit test project use .NET Core, change Travis CI config to use .NET Core instead of mono
1 parent 0e0dc4a commit de686de

File tree

2 files changed

+7
-38
lines changed

2 files changed

+7
-38
lines changed

.travis.yml

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,7 @@
11
language: csharp
2-
solution: F23.StringSimilarity.sln
3-
install:
4-
- nuget restore F23.StringSimilarity.sln
5-
- nuget install xunit.runner.console -Version 2.1.0 -OutputDirectory testrunner
6-
# - nuget install coveralls.io -Version 1.3.4 -OutputDirectory coveralls
7-
8-
# - CURRENT_WORKING_DIR=$(pwd)
9-
10-
# - sudo apt-get install gtk-sharp2
11-
# - curl -sS https://api.nuget.org/packages/mono.cecil.0.9.5.4.nupkg > /tmp/mono.cecil.0.9.5.4.nupkg.zip
12-
# - unzip /tmp/mono.cecil.0.9.5.4.nupkg.zip -d /tmp/cecil
13-
# - cp /tmp/cecil/lib/net40/Mono.Cecil.dll .
14-
# - cp /tmp/cecil/lib/net40/Mono.Cecil.dll /tmp/cecil/
15-
# - git clone --depth=50 git://github.com/csMACnz/monocov.git ../../csMACnz/monocov
16-
# - cd ../../csMACnz/monocov
17-
# - cp /tmp/cecil/Mono.Cecil.dll .
18-
# - ./configure
19-
# - make
20-
# - sudo make install
21-
# - cd $CURRENT_WORKING_DIR
22-
2+
mono: none
3+
dotnet: 2.0.0
4+
dist: trusty
235
script:
24-
- xbuild /p:Configuration=Release F23.StringSimilarity.sln
25-
- mono ./testrunner/xunit.runner.console.2.1.0/tools/xunit.console.exe ./test/F23.StringSimilarity.Tests/bin/Release/F23.StringSimilarity.Tests.dll
26-
27-
# - export LD_LIBRARY_PATH=/usr/local/lib
28-
# - mono --debug --profile=monocov:outfile=monocovCoverage.cov,+[F23.StringSimilarity],+[F23.StringSimilarity.Tests] ./testrunner/xunit.runner.console.2.1.0/tools/xunit.console.exe ./test/F23.StringSimilarity.Tests/bin/Release/F23.StringSimilarity.Tests.dll
29-
# - monocov --export-xml=monocovCoverage monocovCoverage.cov
30-
# - REPO_COMMIT_AUTHOR=$(git show -s --pretty=format:"%cn")
31-
# - REPO_COMMIT_AUTHOR_EMAIL=$(git show -s --pretty=format:"%ce")
32-
# - REPO_COMMIT_MESSAGE=$(git show -s --pretty=format:"%s")
33-
# - echo $TRAVIS_COMMIT
34-
# - echo $TRAVIS_BRANCH
35-
# - echo $REPO_COMMIT_AUTHOR
36-
# - echo $REPO_COMMIT_AUTHOR_EMAIL
37-
# - echo $REPO_COMMIT_MESSAGE
38-
# - echo $TRAVIS_JOB_ID
39-
# - mono ./coveralls/coveralls.io.1.3.4/tools/coveralls.net.exe --monocov -i ./monocovCoverage --commitId $TRAVIS_COMMIT --commitBranch $TRAVIS_BRANCH --commitAuthor "$REPO_COMMIT_AUTHOR" --commitEmail "$REPO_COMMIT_AUTHOR_EMAIL" --commitMessage "$REPO_COMMIT_MESSAGE" --jobId $TRAVIS_JOB_ID --serviceName "travis-ci" --useRelativePaths
6+
- dotnet build -c Release src/F23.StringSimilarity/F23.StringSimilarity.csproj
7+
- dotnet test test/F23.StringSimilarity.Tests/F23.StringSimilarity.Tests.csproj

test/F23.StringSimilarity.Tests/F23.StringSimilarity.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net462</TargetFramework>
4+
<TargetFramework>netcoreapp2.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
@@ -15,6 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
1819
<PackageReference Include="xunit" Version="2.2.0" />
1920
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
2021
</ItemGroup>

0 commit comments

Comments
 (0)