Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 38 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,42 @@ jobs:
with:
fetch-depth: 0
- name: Run tests
run: dotnet test --verbosity normal
run: dotnet test --verbosity normal --collect:"XPlat Code Coverage"
- name: Upload coverage
uses: actions/upload-artifact@v2
with:
name: Code coverage ${{ matrix.os }}
path: "**/coverage.cobertura.xml"
coverage:
name: Coverage
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: Code coverage ubuntu-latest
path: coverage-ubuntu
- uses: actions/download-artifact@v2
with:
name: Code coverage windows-latest
path: coverage-windows
- uses: actions/download-artifact@v2
with:
name: Code coverage macos-latest
path: coverage-macos
- name: Generate coverage report
uses: danielpalme/ReportGenerator-GitHub-Action@4.7.1
with:
reports: "**/coverage.cobertura.xml"
targetdir: "coverage-report"
reporttypes: "Cobertura"
- name: Publish coverage report to Codacy
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage-report/Cobertura.xml
pack:
name: Pack
needs: [test]
Expand All @@ -28,10 +63,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install .NET Core 3.1 SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
- name: Create packages
run: dotnet pack --configuration Release --output ./packages
- name: Upload a Build Artifact
Expand All @@ -53,14 +84,14 @@ jobs:
with:
name: NuGet packages
path: packages
- name: Push packages
- name: Push packages
run: dotnet nuget push "packages/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- uses: dotnet/nbgv@v0.3.1
id: nbgv
- name: Create GitHub release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
with:
tag_name: v${{ steps.nbgv.outputs.SemVer2 }}
release_name: v${{ steps.nbgv.outputs.SemVer2 }}
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "3.1.302",
"rollForward": "latestMinor"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<ProjectReference Include="../../src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="1.3.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="nunit" Version="3.12.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<ProjectReference Include="../../src/System.IO.Abstractions/System.IO.Abstractions.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="1.3.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="nunit" Version="3.12.0" />
Expand Down