build master branch after merge or push (#390)

* Update ci.yml

* Add codecov

* Remove codecov for now

* Add coverlet.collector and codecov

Former-commit-id: 5bd17dc44f
This commit is contained in:
Malte Rosenbjerg 2023-02-05 00:07:52 +01:00 committed by GitHub
parent 3837edee8c
commit 8943809050
2 changed files with 18 additions and 1 deletions

View file

@ -1,6 +1,13 @@
name: CI name: CI
on: on:
push:
branches:
- master
paths:
- .github/workflows/ci.yml
- FFMpegCore/**
- FFMpegCore.Test/**
pull_request: pull_request:
branches: branches:
- master - master
@ -36,4 +43,10 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Test with dotnet - name: Test with dotnet
run: dotnet test FFMpegCore.sln --logger GitHubActions run: dotnet test FFMpegCore.sln --collect "XPlat Code Coverage" --logger GitHubActions
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
directory: FFMpegCore.Test/TestResults
fail_ci_if_error: true

View file

@ -8,6 +8,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.9.0" /> <PackageReference Include="FluentAssertions" Version="6.9.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1"> <PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>