Skip to content

Commit 9a0630b

Browse files
authored
refactor: add explicit API test step in the build pipeline (#1214)
* Add explicit API build and test step in the pipeline
1 parent e075fe8 commit 9a0630b

File tree

3 files changed

+37
-17
lines changed

3 files changed

+37
-17
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ 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
@@ -32,9 +32,29 @@ jobs:
3232
with:
3333
name: Code coverage ${{ matrix.os }}
3434
path: "**/coverage.cobertura.xml"
35+
api-test:
36+
name: API Test
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout sources
40+
uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 0
43+
- name: Setup .NET
44+
uses: actions/setup-dotnet@v4
45+
with:
46+
dotnet-version: |
47+
6.0.x
48+
7.0.x
49+
8.0.x
50+
9.0.x
51+
- name: Build solution
52+
run: dotnet build
53+
- name: Run tests
54+
run: dotnet test --filter FullyQualifiedName~TestableIO.System.IO.Abstractions.Api.Tests --logger "GitHubActions"
3555
coverage:
3656
name: Coverage
37-
needs: [test]
57+
needs: [test, api-test]
3858
runs-on: ubuntu-latest
3959
steps:
4060
- name: Checkout sources
@@ -67,7 +87,7 @@ jobs:
6787
coverage-reports: coverage-report/Cobertura.xml
6888
pack:
6989
name: Pack
70-
needs: [test]
90+
needs: [test, api-test]
7191
runs-on: ubuntu-latest
7292
steps:
7393
- name: Checkout sources

src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackageIcon>icon_256x256.png</PackageIcon>
2020
</PropertyGroup>
2121
<ItemGroup>
22-
<None Include="..\..\images\icon_256x256.png" Pack="true" PackagePath="\"/>
22+
<None Include="$(SolutionDir)/images/icon_256x256.png" Pack="true" PackagePath="/" Link="/icon_256x256.png"/>
2323
</ItemGroup>
2424

2525
<ItemGroup>
@@ -28,5 +28,5 @@
2828
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2929
</PackageReference>
3030
</ItemGroup>
31-
31+
3232
</Project>
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<AssemblyName>System.IO.Abstractions</AssemblyName>
5-
<RootNamespace>System.IO.Abstractions</RootNamespace>
6-
<Description>A set of abstractions to help make file system interactions testable.</Description>
7-
</PropertyGroup>
8-
9-
<ItemGroup>
10-
<ProjectReference Include="..\TestableIO.System.IO.Abstractions\TestableIO.System.IO.Abstractions.csproj" />
11-
<ProjectReference Include="..\TestableIO.System.IO.Abstractions.Wrappers\TestableIO.System.IO.Abstractions.Wrappers.csproj" />
12-
</ItemGroup>
13-
2+
3+
<PropertyGroup>
4+
<AssemblyName>System.IO.Abstractions</AssemblyName>
5+
<RootNamespace>System.IO.Abstractions</RootNamespace>
6+
<Description>A set of abstractions to help make file system interactions testable.</Description>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\TestableIO.System.IO.Abstractions\TestableIO.System.IO.Abstractions.csproj"/>
11+
<ProjectReference Include="..\TestableIO.System.IO.Abstractions.Wrappers\TestableIO.System.IO.Abstractions.Wrappers.csproj"/>
12+
</ItemGroup>
13+
1414
</Project>

0 commit comments

Comments
 (0)