From e075fe87e728721c1d80fcc71886d8e485c4c291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Sat, 22 Feb 2025 16:13:44 +0100 Subject: [PATCH 1/2] refactor: consolidate use of meta project packages (#1215) Remaining issue from #1211: Also adapt the projects for Meta packages. --- .github/workflows/ci.yml | 2 +- ...stem.IO.Abstractions.TestingHelpers.csproj | 24 ++++++------ .../System.IO.Abstractions.csproj | 8 ++-- .../TestableIO.System.IO.Abstractions.csproj | 38 +++++++++---------- 4 files changed, 33 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c959c7980..d08690638 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: 8.0.x 9.0.x - name: Run tests - run: dotnet test --collect:"XPlat Code Coverage" --logger "GitHubActions" + run: dotnet test --filter FullyQualifiedName\!~TestableIO.System.IO.Abstractions.Api.Tests --collect:"XPlat Code Coverage" --logger "GitHubActions" - name: Upload coverage uses: actions/upload-artifact@v4 with: diff --git a/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj b/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj index d22f94fe5..c3852465d 100644 --- a/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj +++ b/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj @@ -1,15 +1,13 @@  - - System.IO.Abstractions.TestingHelpers - System.IO.Abstractions.TestingHelpers - A set of pre-built mocks to help when testing file system interactions. - net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net472 - icon_256x256.png - - - - - - - + + + System.IO.Abstractions.TestingHelpers + System.IO.Abstractions.TestingHelpers + A set of pre-built mocks to help when testing file system interactions. + + + + + + diff --git a/src/System.IO.Abstractions/System.IO.Abstractions.csproj b/src/System.IO.Abstractions/System.IO.Abstractions.csproj index b60e2ee22..044581f9a 100644 --- a/src/System.IO.Abstractions/System.IO.Abstractions.csproj +++ b/src/System.IO.Abstractions/System.IO.Abstractions.csproj @@ -1,16 +1,14 @@  + System.IO.Abstractions System.IO.Abstractions A set of abstractions to help make file system interactions testable. - net8.0;net6.0;netstandard2.1;netstandard2.0;net472 - icon_256x256.png + - - - + diff --git a/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj b/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj index 236734151..bc3e9307f 100644 --- a/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj +++ b/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj @@ -1,21 +1,19 @@ - - TestableIO.System.IO.Abstractions - System.IO.Abstractions - A set of abstractions to help make file system interactions testable. - net9.0;net8.0;net6.0;netstandard2.1;netstandard2.0;net472 - icon_256x256.png - enable - preview - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - \ No newline at end of file + + + TestableIO.System.IO.Abstractions + System.IO.Abstractions + A set of abstractions to help make file system interactions testable. + enable + preview + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + From 9a0630b7722b754058def0f5570964ee515e807a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Sat, 22 Feb 2025 16:19:59 +0100 Subject: [PATCH 2/2] refactor: add explicit API test step in the build pipeline (#1214) * Add explicit API build and test step in the pipeline --- .github/workflows/ci.yml | 26 ++++++++++++++++--- src/Directory.Build.props | 4 +-- .../System.IO.Abstractions.csproj | 24 ++++++++--------- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d08690638..638b2c4cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: | + dotnet-version: | 6.0.x 7.0.x 8.0.x @@ -32,9 +32,29 @@ jobs: with: name: Code coverage ${{ matrix.os }} path: "**/coverage.cobertura.xml" + api-test: + name: API Test + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 6.0.x + 7.0.x + 8.0.x + 9.0.x + - name: Build solution + run: dotnet build + - name: Run tests + run: dotnet test --filter FullyQualifiedName~TestableIO.System.IO.Abstractions.Api.Tests --logger "GitHubActions" coverage: name: Coverage - needs: [test] + needs: [test, api-test] runs-on: ubuntu-latest steps: - name: Checkout sources @@ -67,7 +87,7 @@ jobs: coverage-reports: coverage-report/Cobertura.xml pack: name: Pack - needs: [test] + needs: [test, api-test] runs-on: ubuntu-latest steps: - name: Checkout sources diff --git a/src/Directory.Build.props b/src/Directory.Build.props index edec72d8b..594dcab3d 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -19,7 +19,7 @@ icon_256x256.png - + @@ -28,5 +28,5 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/System.IO.Abstractions/System.IO.Abstractions.csproj b/src/System.IO.Abstractions/System.IO.Abstractions.csproj index 044581f9a..931a4b5e1 100644 --- a/src/System.IO.Abstractions/System.IO.Abstractions.csproj +++ b/src/System.IO.Abstractions/System.IO.Abstractions.csproj @@ -1,14 +1,14 @@  - - - System.IO.Abstractions - System.IO.Abstractions - A set of abstractions to help make file system interactions testable. - - - - - - - + + + System.IO.Abstractions + System.IO.Abstractions + A set of abstractions to help make file system interactions testable. + + + + + + +