Skip to content

Commit 0fe6f6e

Browse files
committed
Add explicit API test step in the pipeline
1 parent 2c7f001 commit 0fe6f6e

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
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+
9.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0</TargetFrameworks>
4+
<TargetFrameworks>net9.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

0 commit comments

Comments
 (0)