Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/1.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm committed Feb 1, 2020
2 parents 599d2ed + f6b0c78 commit 410bfd2
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 70 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build

on: [push, pull_request]
on:
push:
tags-ignore:
- '*'
pull_request:

jobs:
build:
Expand All @@ -12,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.108
dotnet-version: 3.1.101
- name: Build with cake
run: ./build.ps1 -Verbosity Diagnostic
shell: powershell
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

46 changes: 23 additions & 23 deletions Source/Codecov.Tests/Codecov.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.7.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="FluentAssertions" Version="5.9.0" />
<PackageReference Include="NSubstitute" Version="4.2.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>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Codecov.Tool\Codecov.Tool.csproj" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.8.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="FluentAssertions" Version="5.10.0" />
<PackageReference Include="NSubstitute" Version="4.2.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>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Codecov.Tool\Codecov.Tool.csproj" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/Codecov.Tool/Codecov.Tool.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
<CodeAnalysisRuleSet>.\Codecov.ruleset</CodeAnalysisRuleSet>
<PackageId>Codecov.Tool</PackageId>
<ToolCommandName>codecov</ToolCommandName>
Expand Down
8 changes: 4 additions & 4 deletions Source/Codecov/Codecov.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition="'$(TargetFramework)' == ''">
<TargetFramework>netcoreapp2.1</TargetFramework>
<PropertyGroup Condition="'$(TargetFrameworks)' == ''">
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifiers>win7-x64;linux-x64;osx-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup>
Expand All @@ -25,8 +25,8 @@
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\stylecop.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.6.0" />
<PackageReference Include="Glob" Version="1.1.4" />
<PackageReference Include="CommandLineParser" Version="2.7.82" />
<PackageReference Include="Glob" Version="1.1.5" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.Sinks.ColoredConsole" Version="3.0.1" />
Expand Down
9 changes: 9 additions & 0 deletions Source/Codecov/Program/UploadFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Codecov.Terminal;
using Codecov.Upload;
using Codecov.Url;
using Codecov.Utilities;
using Codecov.Yaml;

namespace Codecov.Program
Expand Down Expand Up @@ -112,6 +113,14 @@ public void Uploader()
return;
}

// We warn if the total file size is above 20 MB
var fileSizes = Coverage.CoverageReports.Sum(x => FileSystem.GetFileSize(x.File));
if (fileSizes > 20_971_520)
{
Log.Warning($"Total file size of reports is above 20MB, this may prevent report being shown on {Url.GetUrl.Host}");
Log.Warning("Reduce the total upload size if this occurs");
}

Log.Information("Uploading Reports.");
Log.Information($"url: {Url.GetUrl.Scheme}://{Url.GetUrl.Authority}");
Log.Verboase($"api endpoint: {Url.GetUrl}");
Expand Down
6 changes: 6 additions & 0 deletions Source/Codecov/Utilities/FileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Codecov.Utilities
{
internal static class FileSystem
{
internal static long GetFileSize(string path)
{
var fileInfo = new FileInfo(path);
return fileInfo.Exists ? fileInfo.Length : 0;
}

internal static string NormalizedPath(string path)
{
if (string.IsNullOrWhiteSpace(path))
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
- Ubuntu
- Visual Studio 2017
- Visual Studio 2019

pull_requests:
do_not_increment_build_number: true
Expand Down
21 changes: 14 additions & 7 deletions setup.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#module "nuget:?package=Cake.DotNetTool.Module&version=0.2.0"
#addin "nuget:?package=Cake.Warp&version=0.1.0"
#load "nuget:?package=Cake.Recipe&version=1.0.0"
#load ".build/coverlet.cake"
#load ".build/codecov.cake"
Expand Down Expand Up @@ -52,39 +51,47 @@ Task("DotNetCore-Publish")
NoBuild = true,
NoRestore = true,
OutputDirectory = BuildParameters.Paths.Directories.NuGetPackages,
MSBuildSettings = msBuildSettings
MSBuildSettings = msBuildSettings,
});
var project = ParseProject(BuildParameters.SourceDirectoryPath + "/Codecov/Codecov.csproj", BuildParameters.Configuration);
var runtimeIdentifiers = project.NetCore.RuntimeIdentifiers;
EnsureDirectoryExists(BuildParameters.Paths.Directories.Build);
foreach (var runtime in runtimeIdentifiers) {
msBuildSettings = msBuildSettings
.WithProperty("PublishSingleFile", "true")
.WithProperty("PublishTrimmed", "true");
var outputDirectory = publishDirectory + "/" + runtime;
WarpPlatforms warpPlatform;
string warpOutputBase = BuildParameters.Paths.Directories.Build + "/codecov-";
if (runtime.StartsWith("win"))
{
warpPlatform = WarpPlatforms.WindowsX64;
warpOutputBase += "windows-x64.exe";
}
else if (runtime.StartsWith("osx"))
{
warpPlatform = WarpPlatforms.MacOSX64;
warpOutputBase += "osx-x64";
}
else
{
warpPlatform = WarpPlatforms.LinuxX64;
warpOutputBase += "linux-x64";
}
DotNetCorePublish(project.ProjectFilePath.FullPath, new DotNetCorePublishSettings {
Runtime = runtime,
SelfContained = true,
OutputDirectory = outputDirectory,
MSBuildSettings = msBuildSettings
});
Warp(outputDirectory, (warpPlatform == WarpPlatforms.WindowsX64 ? "codecov.exe" : "codecov"), warpOutputBase, warpPlatform);
var files = GetFiles(outputDirectory + "/codecov*");
foreach (var file in files)
{
if (file.GetExtension() != ".pdb")
{
CopyFile(file, warpOutputBase);
}
}
}
});

Expand Down

0 comments on commit 410bfd2

Please sign in to comment.