From b79c2d136761a3647fc1706e25a65a25c39d5b43 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 22 Feb 2025 15:27:52 +0100 Subject: [PATCH 1/4] Add explicit API test step in the pipeline --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c959c7980..7e6cb599d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,21 +20,43 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: | + dotnet-version: | 6.0.x 7.0.x 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: name: Code coverage ${{ matrix.os }} path: "**/coverage.cobertura.xml" + api-test: + name: Test + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + 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: 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 +89,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 From f8ee0ba0dced4e4cfee047d6fc0f2d76caf3b021 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 22 Feb 2025 15:39:24 +0100 Subject: [PATCH 2/4] Run API tests on ubuntu --- .github/workflows/ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e6cb599d..5e6c409a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,12 +33,8 @@ jobs: name: Code coverage ${{ matrix.os }} path: "**/coverage.cobertura.xml" api-test: - name: Test - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} + name: API Test + runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v4 From a821dc6b0d71226c0e6e18c15e9f0cea16a27a78 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 22 Feb 2025 15:42:04 +0100 Subject: [PATCH 3/4] Build solution --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e6c409a2..638b2c4cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,8 @@ jobs: 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: From a4b4d4c8a169589b1dac461ef6b871fe8dbe919d Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 22 Feb 2025 16:00:40 +0100 Subject: [PATCH 4/4] Fix pack --- src/Directory.Build.props | 4 +-- ...stem.IO.Abstractions.TestingHelpers.csproj | 24 ++++++------- .../System.IO.Abstractions.csproj | 26 +++++++------- .../TestableIO.System.IO.Abstractions.csproj | 36 +++++++++---------- 4 files changed, 42 insertions(+), 48 deletions(-) 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.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj b/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj index d22f94fe5..ba68ec685 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..d98a2d5a3 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 - - - - - - - - + + + System.IO.Abstractions + System.IO.Abstractions + A set of abstractions to help make file system interactions testable. + + + + + + + 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..07eacce1d 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 - - - - - - + + + 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 + + + + \ No newline at end of file