Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm committed Apr 26, 2019
2 parents 9576b2e + 3c7fdaa commit bcd7b90
Show file tree
Hide file tree
Showing 19 changed files with 529 additions and 171 deletions.
99 changes: 99 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"projectName": "Cake.Codecov",
"projectOwner": "cake-contrib",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "larzw",
"name": "Larz White",
"avatar_url": "https://avatars0.githubusercontent.com/u/6298611?v=4",
"profile": "https://www.linkedin.com/in/larz-white-5a8264108",
"contributions": [
"maintenance"
]
},
{
"login": "AdmiringWorm",
"name": "Kim J. Nordmo",
"avatar_url": "https://avatars3.githubusercontent.com/u/1474648?v=4",
"profile": "https://github.com/AdmiringWorm",
"contributions": [
"maintenance"
]
},
{
"login": "gep13",
"name": "Gary Ewan Park",
"avatar_url": "https://avatars3.githubusercontent.com/u/1271146?v=4",
"profile": "http://www.gep13.co.uk/blog",
"contributions": [
"review",
"ideas"
]
},
{
"login": "vkbishnoi",
"name": "Vishal Bishnoi",
"avatar_url": "https://avatars0.githubusercontent.com/u/8297727?v=4",
"profile": "https://github.com/vkbishnoi",
"contributions": [
"code"
]
},
{
"login": "pascalberger",
"name": "Pascal Berger",
"avatar_url": "https://avatars1.githubusercontent.com/u/2190718?v=4",
"profile": "https://twitter.com/hereispascal",
"contributions": [
"ideas"
]
},
{
"login": "twenzel",
"name": "Toni Wenzel",
"avatar_url": "https://avatars2.githubusercontent.com/u/500376?v=4",
"profile": "https://github.com/twenzel",
"contributions": [
"ideas"
]
},
{
"login": "Jericho",
"name": "jericho",
"avatar_url": "https://avatars0.githubusercontent.com/u/112710?v=4",
"profile": "https://github.com/Jericho",
"contributions": [
"ideas"
]
},
{
"login": "gitfool",
"name": "Sean Fausett",
"avatar_url": "https://avatars2.githubusercontent.com/u/750121?v=4",
"profile": "https://github.com/gitfool",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"types": {
"bug": {
"symbol": "🐛",
"description": "Bug reports",
"link": "<%= options.repoHost %>/<%= options.projectOwner %>/<%= options.projectName %>/issues?q=author%3A<%= contributor.login %>+label%3Abug"
},
"ideas": {
"symbol": "🤔",
"description": "Ideas, Planning, & Feedback",
"link": "<%= options.repoHost %>/<%= options.projectOwner %>/<%= options.projectName %>/issues?q=author%3A<%= contributor.login %>"
}
}
}
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
root = true

[*]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
Expand All @@ -16,5 +17,12 @@ end_of_line = crlf
[*.sh]
end_of_line = LF

[*.ps1]
end_of_line = CRLF
charset = utf-8-bom

[*.DotSettings]
end_of_line = LF

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@
#*.RTF diff=astextplain

*.ps1 text eol=crlf
*.sh text eol=lf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,4 @@ paket-files/
tools/**
!tools/packages.config
BuildArtifacts/
.dotnet/
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: csharp
dist: xenial
os:
- linux
- osx
mono: latest
dotnet: 2.1.603

cache:
directories:
- tools
env:
global:
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
git:
depth: false

branches:
except:
- ci/appveyor
- /^dependabot\/.*/

script:
- ./build.sh --target=Linux
37 changes: 37 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/Source/Cake.Codecov.sln"
],
"problemMatcher": "$tsc"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"--project",
"${workspaceFolder}/Source/Cake.Codecov.Tests/Cake.Codecov.Tests.csproj",
"test"
],
"linux": {
"args": [
"watch",
"--project",
"${workspaceFolder}/Source/Cake.Codecov.Tests/Cake.Codecov.Tests.csproj",
"test",
"--framework",
"netcoreapp2.0"
]
},
"problemMatcher": "$tsc"
}
]
}
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Cake.Codecov
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors)

[![AppVeyor branch](https://img.shields.io/appveyor/ci/cakecontrib/cake-codecov/master.svg)](https://ci.appveyor.com/project/cakecontrib/cake-codecov/branch/master)
[![NuGet](https://img.shields.io/nuget/v/Cake.Codecov.svg)](https://www.nuget.org/packages/Cake.Codecov/)
Expand Down Expand Up @@ -99,3 +100,14 @@ Feel free to open an [issue](https://github.com/cake-contrib/Cake.Codecov/issues
Codecov(settings);
});
```

## Contributors

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
<table><tr><td align="center"><a href="https://www.linkedin.com/in/larz-white-5a8264108"><img src="https://avatars0.githubusercontent.com/u/6298611?v=4" width="100px;" alt="Larz White"/><br /><sub><b>Larz White</b></sub></a><br /><a href="#maintenance-larzw" title="Maintenance">🚧</a></td><td align="center"><a href="https://github.com/AdmiringWorm"><img src="https://avatars3.githubusercontent.com/u/1474648?v=4" width="100px;" alt="Kim J. Nordmo"/><br /><sub><b>Kim J. Nordmo</b></sub></a><br /><a href="#maintenance-AdmiringWorm" title="Maintenance">🚧</a></td><td align="center"><a href="http://www.gep13.co.uk/blog"><img src="https://avatars3.githubusercontent.com/u/1271146?v=4" width="100px;" alt="Gary Ewan Park"/><br /><sub><b>Gary Ewan Park</b></sub></a><br /><a href="#review-gep13" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3Agep13" title="Ideas, Planning, & Feedback">🤔</a></td><td align="center"><a href="https://github.com/vkbishnoi"><img src="https://avatars0.githubusercontent.com/u/8297727?v=4" width="100px;" alt="Vishal Bishnoi"/><br /><sub><b>Vishal Bishnoi</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/commits?author=vkbishnoi" title="Code">💻</a></td><td align="center"><a href="https://twitter.com/hereispascal"><img src="https://avatars1.githubusercontent.com/u/2190718?v=4" width="100px;" alt="Pascal Berger"/><br /><sub><b>Pascal Berger</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3Apascalberger" title="Ideas, Planning, & Feedback">🤔</a></td><td align="center"><a href="https://github.com/twenzel"><img src="https://avatars2.githubusercontent.com/u/500376?v=4" width="100px;" alt="Toni Wenzel"/><br /><sub><b>Toni Wenzel</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3Atwenzel" title="Ideas, Planning, & Feedback">🤔</a></td><td align="center"><a href="https://github.com/Jericho"><img src="https://avatars0.githubusercontent.com/u/112710?v=4" width="100px;" alt="jericho"/><br /><sub><b>jericho</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/issues?q=author%3AJericho" title="Ideas, Planning, & Feedback">🤔</a></td></tr><tr><td align="center"><a href="https://github.com/gitfool"><img src="https://avatars2.githubusercontent.com/u/750121?v=4" width="100px;" alt="Sean Fausett"/><br /><sub><b>Sean Fausett</b></sub></a><br /><a href="https://github.com/cake-contrib/Cake.Codecov/commits?author=gitfool" title="Code">💻</a></td></tr></table>
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
16 changes: 16 additions & 0 deletions Source/Cake.Codecov.Tests/Attributes/UnixTheoryAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Runtime.InteropServices;
using Xunit;

namespace Cake.Codecov.Tests.Attributes
{
public class UnixTheoryAttribute : TheoryAttribute
{
public UnixTheoryAttribute(string reason = null)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Skip = reason ?? "non-windows test";
}
}
}
}
17 changes: 17 additions & 0 deletions Source/Cake.Codecov.Tests/Attributes/WindowsTheoryAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Runtime.InteropServices;
using Xunit;

namespace Cake.Codecov.Tests.Attributes
{
public class WindowsTheoryAttribute : TheoryAttribute
{

public WindowsTheoryAttribute(string reason = null)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Skip = reason ?? "windows test.";
}
}
}
}
25 changes: 17 additions & 8 deletions Source/Cake.Codecov.Tests/Cake.Codecov.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Unix'">netcoreapp2.0;net46</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Testing" Version="0.28.0" />
<PackageReference Include="FluentAssertions" Version="5.5.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Cake.Testing" Version="0.33.0"/>
<PackageReference Include="coverlet.msbuild" Version="2.6.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="5.6.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1"/>
<PackageReference Include="Moq" Version="4.10.1"/>
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cake.Codecov\Cake.Codecov.csproj" />
<ProjectReference Include="..\Cake.Codecov\Cake.Codecov.csproj"/>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion Source/Cake.Codecov.Tests/CodecovAliasesFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public CodecovAliasesFixture()
argumentsMoq.Object,
ProcessRunner,
registryMoq.Object,
Tools,dataService.Object);
Tools,dataService.Object,
Configuration);
}

protected override void RunTool()
Expand Down
20 changes: 19 additions & 1 deletion Source/Cake.Codecov.Tests/CodecovRunnerTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Cake.Codecov.Tests.Attributes;
using Cake.Core;
using Cake.Testing;
using FluentAssertions;
Expand Down Expand Up @@ -51,10 +52,27 @@ public void Should_Use_Codecov_Runner_From_Tool_Path_If_Provided(string toolPath
result.Path.FullPath.Should().Be(expected);
}

[Theory]
[WindowsTheory]
[InlineData("C:/Codecov/codecov.exe", "C:/Codecov/codecov.exe")]
public void Should_Use_Codecov_Runner_From_Tool_Path_If_Provided_On_Windows(string toolPath, string expected)
{

// Given
var fixture = new CodecovRunnerFixture { Settings = { ToolPath = toolPath } };
fixture.GivenSettingsToolPathExist();

// When
var result = fixture.Run();

// Then
result.Path.FullPath.Should().Be(expected);
}

[UnixTheory]
[InlineData("/usr/bin/codecov", "/usr/bin/codecov")]
public void Should_Use_Codecov_Runner_From_Tool_Path_If_Provided_On_Unix(string toolPath, string expected)
{

// Given
var fixture = new CodecovRunnerFixture { Settings = { ToolPath = toolPath } };
fixture.GivenSettingsToolPathExist();
Expand Down
7 changes: 3 additions & 4 deletions Source/Cake.Codecov/Cake.Codecov.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
<PropertyGroup>
<CodeAnalysisRuleSet>.\Cake.Codecov.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Cake.Codecov.xml</DocumentationFile>
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="stylecop.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cake.Core" Version="0.28.0" PrivateAssets="All" />
<PackageReference Include="JetBrains.Annotations" Version="2018.2.1" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61" PrivateAssets="All" />
<PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.1" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-rc.114" PrivateAssets="all" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions Source/Cake.Codecov/CodecovRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ internal void Run(CodecovSettings settings)

protected override IEnumerable<string> GetToolExecutableNames()
{
yield return "codecov";
yield return "codecov.exe";
}

Expand Down
20 changes: 17 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
image: Visual Studio 2017
image:
- Visual Studio 2017
- Ubuntu
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
branches:
except:
- ci/travis
- /dependabot\/.*/
skip_commits:
files:
- '*.md'
- 'LICENSE'
- '.travis.yml'

build: off
test: off

build_script:
- ps: .\build.ps1 -Target AppVeyor -Verbosity Diagnostic
- ps: .\build.ps1 --target=AppVeyor
- sh: ./build.sh --target=AppVeyor-Linux

cache:
- 'tools -> build.ps1,setup.cake'
- 'tools -> build.config,setup.cake'
2 changes: 2 additions & 0 deletions build.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DOTNET_VERSION=ANY
CAKE_VERSION=0.33.0
Loading

0 comments on commit bcd7b90

Please sign in to comment.