Skip to content

Set codecov PATH based on its installed version #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
os:
- linux
language: csharp
solution: GeUtilities.sln
mono: none
dotnet: 3.0.0
install:
- dotnet restore

script:
- dotnet build
- dotnet test GeUtilities.Tests/GeUtilities.Tests.csproj
- linux
matrix:
include:
-
dotnet: 3.0
install: ['dotnet restore']
language: csharp
mono: none
script: ['dotnet build', 'dotnet test GeUtilities.Tests/GeUtilities.Tests.csproj']
solution: GeUtilities.sln
11 changes: 7 additions & 4 deletions GeUtilities.Tests/GeUtilities.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="OpenCover" Version="4.6.519" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="OpenCover" Version="4.7.922" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
</ItemGroup>

Expand Down
9 changes: 6 additions & 3 deletions GeUtilities/GeUtilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeCoverage" Version="1.0.3" />
<PackageReference Include="OpenCover" Version="4.6.519" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="6.8.1.4648" />
<PackageReference Include="Microsoft.CodeCoverage" Version="16.6.1" />
<PackageReference Include="OpenCover" Version="4.7.922" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.7.0.17535">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
15 changes: 15 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ install:
- dotnet restore
- choco install opencover.portable
- choco install codecov
before_build:
# We let choco to install the latest version of codecov;
# therefore, to correctly set the path to the folder of
# the installed version, the following is what this script
# does:
# 1- Search the installation path of codecov for every version
# (using the `Get-ChildItem1).
# 2- Append build path (i.e., `/build/netstandard1.0/CodeCoverage`)
# to the codecov to every item in the list returned in (1), AND
# separate every item in the list using ';' delimiter.
# 3- Append the generated directories to `PATH`.
#
# An alternative to this approach would be to pin the version
# codecov so its build path is always set to the pinned version.
- {ps: "$env:PATH = @($env:PATH) + [string]::join(\"\\build\\netstandard1.0\\CodeCoverage\\;\", (Get-ChildItem -LiteralPath \"C:\\Users\\appveyor\\.nuget\\packages\\microsoft.codecoverage\\\" -Directory -Recurse).fullname)"}
build:
verbosity: minimal
clone_depth: 1
Expand Down