Skip to content

Commit 4763559

Browse files
committed
Add explicit API test step in the pipeline
1 parent 7facffd commit 4763559

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,40 @@ jobs:
2020
- name: Setup .NET
2121
uses: actions/setup-dotnet@v4
2222
with:
23-
dotnet-version: |
23+
dotnet-version: |
2424
6.0.x
2525
7.0.x
2626
8.0.x
2727
9.0.x
2828
- name: Run tests
29-
run: dotnet test --collect:"XPlat Code Coverage" --logger "GitHubActions"
29+
run: dotnet test --filter FullyQualifiedName\!~TestableIO.System.IO.Abstractions.Api.Tests --collect:"XPlat Code Coverage" --logger "GitHubActions"
3030
- name: Upload coverage
3131
uses: actions/upload-artifact@v4
3232
with:
3333
name: Code coverage ${{ matrix.os }}
3434
path: "**/coverage.cobertura.xml"
35+
api-test:
36+
name: Test
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
os: [ubuntu-latest, windows-latest, macos-latest]
41+
runs-on: ${{ matrix.os }}
42+
steps:
43+
- name: Checkout sources
44+
uses: actions/checkout@v4
45+
with:
46+
fetch-depth: 0
47+
- name: Setup .NET
48+
uses: actions/setup-dotnet@v4
49+
with:
50+
dotnet-version: |
51+
8.0.x
52+
- name: Run tests
53+
run: dotnet test --filter FullyQualifiedName~TestableIO.System.IO.Abstractions.Api.Tests --logger "GitHubActions"
3554
coverage:
3655
name: Coverage
37-
needs: [test]
56+
needs: [test, api-test]
3857
runs-on: ubuntu-latest
3958
steps:
4059
- name: Checkout sources
@@ -67,7 +86,7 @@ jobs:
6786
coverage-reports: coverage-report/Cobertura.xml
6887
pack:
6988
name: Pack
70-
needs: [test]
89+
needs: [test, api-test]
7190
runs-on: ubuntu-latest
7291
steps:
7392
- name: Checkout sources

tests/TestableIO.System.IO.Abstractions.Api.Tests/TestableIO.System.IO.Abstractions.Api.Tests.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="GitHubActionsTestLogger" />
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" />
15-
<PackageReference Include="NUnit"/>
16-
<PackageReference Include="NUnit.Analyzers"/>
17-
<PackageReference Include="NUnit3TestAdapter"/>
1813
<PackageReference Include="PublicApiGenerator"/>
1914
<PackageReference Include="aweXpect"/>
2015
</ItemGroup>

0 commit comments

Comments
 (0)