diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index e67b3fc..4612ce6 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -1,6 +1,10 @@
name: Build
-on: [push, pull_request]
+on:
+ push:
+ tags-ignore:
+ - '*'
+ pull_request:
jobs:
build:
@@ -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
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index e89f65b..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-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:
- only:
- - master
- - develop
- - /release\/.*/
- - /hotfix\/.*/
- - /feature\/.*/
- - /bugfix\/.*/
-
-script:
- - ./build.sh
diff --git a/Source/Codecov.Tests/Codecov.Tests.csproj b/Source/Codecov.Tests/Codecov.Tests.csproj
index c435e65..521de69 100644
--- a/Source/Codecov.Tests/Codecov.Tests.csproj
+++ b/Source/Codecov.Tests/Codecov.Tests.csproj
@@ -1,25 +1,25 @@
-
- netcoreapp2.1
-
-
-
- runtime; build; native; contentfiles; analyzers
- all
-
-
-
-
-
-
- runtime; build; native; contentfiles; analyzers
- all
-
-
-
-
-
-
-
-
+
+ netcoreapp2.1;netcoreapp3.0
+
+
+
+ runtime; build; native; contentfiles; analyzers
+ all
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers
+ all
+
+
+
+
+
+
+
+
diff --git a/Source/Codecov.Tool/Codecov.Tool.csproj b/Source/Codecov.Tool/Codecov.Tool.csproj
index b074980..dc5b159 100644
--- a/Source/Codecov.Tool/Codecov.Tool.csproj
+++ b/Source/Codecov.Tool/Codecov.Tool.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.1
+ netcoreapp2.1;netcoreapp3.0
.\Codecov.ruleset
Codecov.Tool
codecov
diff --git a/Source/Codecov/Codecov.csproj b/Source/Codecov/Codecov.csproj
index 46ef27c..f5fdd33 100644
--- a/Source/Codecov/Codecov.csproj
+++ b/Source/Codecov/Codecov.csproj
@@ -1,6 +1,6 @@
-
- netcoreapp2.1
+
+ netcoreapp3.1
win7-x64;linux-x64;osx-x64
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/Source/Codecov/Program/UploadFacade.cs b/Source/Codecov/Program/UploadFacade.cs
index 56bbf90..d8c0bde 100644
--- a/Source/Codecov/Program/UploadFacade.cs
+++ b/Source/Codecov/Program/UploadFacade.cs
@@ -14,6 +14,7 @@
using Codecov.Terminal;
using Codecov.Upload;
using Codecov.Url;
+using Codecov.Utilities;
using Codecov.Yaml;
namespace Codecov.Program
@@ -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}");
diff --git a/Source/Codecov/Utilities/FileSystem.cs b/Source/Codecov/Utilities/FileSystem.cs
index 9d43e62..70a00cb 100644
--- a/Source/Codecov/Utilities/FileSystem.cs
+++ b/Source/Codecov/Utilities/FileSystem.cs
@@ -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))
diff --git a/appveyor.yml b/appveyor.yml
index b4f4a46..d2c791e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,6 +1,6 @@
image:
- Ubuntu
- - Visual Studio 2017
+ - Visual Studio 2019
pull_requests:
do_not_increment_build_number: true
diff --git a/setup.cake b/setup.cake
index 0488597..4a0486e 100644
--- a/setup.cake
+++ b/setup.cake
@@ -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"
@@ -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);
+ }
+ }
}
});