From c826c794d860bad9b8cbaa533052af83902a3050 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Tue, 13 Feb 2018 10:40:12 +0100 Subject: [PATCH 1/6] Add .travis.yml --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..4ee7f2287 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: csharp +solution: System.IO.Abstractions.sln +install: + - dotnet restore +script: + - dotnet build + - dotnet test \ No newline at end of file From 3478b403ec226abe9441310cea9053abc889da58 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Tue, 13 Feb 2018 10:43:54 +0100 Subject: [PATCH 2/6] Use .NET Core in .travis.yml --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4ee7f2287..e8c5d3716 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: csharp -solution: System.IO.Abstractions.sln +mono: none +dotnet: 2.1.4 install: - dotnet restore script: From 44df782d2a95801662284f06524dcf693f19192d Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Wed, 14 Feb 2018 21:12:26 +0100 Subject: [PATCH 3/6] Add netcoreapp2.0 target to TestHelpers.Tests so that the test can run in unix systems --- TestHelpers.Tests/TestHelpers.Tests.csproj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TestHelpers.Tests/TestHelpers.Tests.csproj b/TestHelpers.Tests/TestHelpers.Tests.csproj index e8c2751e3..a309eaf1a 100644 --- a/TestHelpers.Tests/TestHelpers.Tests.csproj +++ b/TestHelpers.Tests/TestHelpers.Tests.csproj @@ -1,6 +1,6 @@  - net40 + net40;netcoreapp2.0 0.0.0.1 The unit tests for our pre-built mocks @@ -39,6 +39,9 @@ + From 829b2613d9b9a4d3b7b105ead834c6c52eb99096 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Wed, 14 Feb 2018 21:26:06 +0100 Subject: [PATCH 4/6] Build & test only linux-compatible frameworks --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e8c5d3716..f1e566e83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: csharp mono: none dotnet: 2.1.4 -install: - - dotnet restore script: - - dotnet build - - dotnet test \ No newline at end of file + - dotnet build System.IO.Abstractions --framework netstandard1.4 + - dotnet build TestingHelpers --framework netstandard1.4 + - dotnet test TestHelpers.Tests --framework netcoreapp2.0 From 9c77eb7c56acddc86eb095b8fbe4361d311174d8 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Wed, 14 Feb 2018 22:19:11 +0100 Subject: [PATCH 5/6] Exclude failing tests from .NET Core/Standard build --- TestHelpers.Tests/MockDirectoryTests.cs | 2 ++ TestHelpers.Tests/MockFileWriteAllBytesTests.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/TestHelpers.Tests/MockDirectoryTests.cs b/TestHelpers.Tests/MockDirectoryTests.cs index ee21d4cdb..66b2e7808 100644 --- a/TestHelpers.Tests/MockDirectoryTests.cs +++ b/TestHelpers.Tests/MockDirectoryTests.cs @@ -784,7 +784,9 @@ public void MockDirectory_GetFiles_ShouldFindFilesContainingTwoOrMoreDots() Assert.That(actualResult, Is.EquivalentTo(new [] { testPath })); } +#if NET40 [TestCase(@"""")] +#endif [TestCase("aa\t")] public void MockDirectory_GetFiles_ShouldThrowAnArgumentException_IfSearchPatternHasIllegalCharacters(string searchPattern) { diff --git a/TestHelpers.Tests/MockFileWriteAllBytesTests.cs b/TestHelpers.Tests/MockFileWriteAllBytesTests.cs index bb4d4609b..700feeec0 100644 --- a/TestHelpers.Tests/MockFileWriteAllBytesTests.cs +++ b/TestHelpers.Tests/MockFileWriteAllBytesTests.cs @@ -58,7 +58,9 @@ public void MockFile_WriteAllBytes_ShouldThrowAnUnauthorizedAccessExceptionIfFil Assert.Throws(action, "Access to the path '{0}' is denied.", path); } +#if NET40 [Test] +#endif public void MockFile_WriteAllBytes_ShouldThrowAnArgumentExceptionIfContainsIllegalCharacters() { // Arrange From 76e0c6afa8c78d6404dc2413fbcf07fc2f11c949 Mon Sep 17 00:00:00 2001 From: Tatham Oddie Date: Wed, 4 Jul 2018 16:42:50 +0300 Subject: [PATCH 6/6] Add Travis build icon to readme.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9af2660cb..77c28473f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Build status](https://ci.appveyor.com/api/projects/status/em172apw1v5k70vq/branch/master?svg=true)](https://ci.appveyor.com/project/tathamoddie/system-io-abstractions/branch/master) +[![Windows build status](https://ci.appveyor.com/api/projects/status/em172apw1v5k70vq/branch/master?svg=true)](https://ci.appveyor.com/project/tathamoddie/system-io-abstractions/branch/master) +[![Linus build status](https://travis-ci.org/System-IO-Abstractions/System.IO.Abstractions.svg?branch=master)](https://travis-ci.org/System-IO-Abstractions/System.IO.Abstractions) [![NuGet](https://img.shields.io/nuget/v/System.IO.Abstractions.svg)](https://www.nuget.org/packages/System.IO.Abstractions) Just like System.Web.Abstractions, but for System.IO. Yay for testable IO access!