Skip to content

Commit

Permalink
💚 Fix codecov upload (#129)
Browse files Browse the repository at this point in the history
It's been broken for sometime as `codecov.msbuild` was deprecated and
archived ages ago. I've just been giving it the attention it deserves.

---------

Signed-off-by: Izzy Muerte <[email protected]>
  • Loading branch information
bruxisma authored Apr 21, 2024
1 parent d65d12b commit ebc9ac0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
branches: [main]
jobs:
build:
permissions:
id-token: write
checks: read
strategy:
matrix:
cfg: [Release, Debug]
Expand Down Expand Up @@ -37,3 +40,9 @@ jobs:
dotnet test --nologo --no-restore
--configuration ${{ matrix.cfg }}
--logger GitHubActions
--property:CoverletOutput=${{github.workspace}}/coverage.opencover.xml
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
files: ${{github.workspace}}/coverage.opencover.xml
use_oidc: true
6 changes: 0 additions & 6 deletions Atmosphere.Tests/Atmosphere.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="codecov.msbuild" />
<PackageReference Include="coverlet.collector" />
<PackageReference Include="coverlet.msbuild" />
<PackageReference Include="xunit" />
Expand All @@ -21,9 +20,4 @@
<ProjectReference Include="..\Atmosphere\Atmosphere.csproj" />
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Target Name="UploadCoverageToCodecov"
AfterTargets="GenerateCoverageResultAfterTest"
Condition="'$(ContinuousIntegrationBuild)' == 'true'">
<Codecov ReportFiles="@(CoverletReport)" />
</Target>
</Project>
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" developmentDependency="true" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.3" developmentDependency="true" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" developmentDependency="true" />
<PackageVersion Include="codecov.msbuild" Version="1.13.0" developmentDependency="true" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" developmentDependency="true" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" developmentDependency="true" />
<PackageVersion Include="xunit" Version="2.7.1" developmentDependency="true" />
Expand Down

0 comments on commit ebc9ac0

Please sign in to comment.