Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmada committed May 13, 2021
1 parent 3367b9b commit 060683b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 32 deletions.
56 changes: 25 additions & 31 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
name: .NET Core

on: [push]
name: .NET

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos]
build:

steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.101
- name: Build solution
run: dotnet build -c:Release
- name: Tests
run: dotnet test ./NetFabric.Angle.UnitTests/NetFabric.Angle.UnitTests.csproj -c:Release -f:netcoreapp3.0

windows:
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
- uses: actions/checkout@v2
-
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.101
dotnet-version: 6.0.x # note: 5.0 lacks msbuild for simple reproducible-builds
include-prerelease: true

- name: Build solution
run: dotnet build -c:Release

- name: Tests with coverage
run: dotnet test ./NetFabric.Angle.UnitTests/NetFabric.Angle.UnitTests.csproj -c:Release -p:CollectCoverage=true -p:Exclude="[xunit.*]*" -p:CoverletOutputFormat=cobertura -p:CoverletOutput="./Coverage/"
- name: Setup report generator
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.4.1
run: dotnet test ./NetFabric.Angle.UnitTests/NetFabric.Angle.UnitTests.csproj -c:Release -f:net6.0 -p:CollectCoverage=true -p:CoverletOutputFormat=lcov -p:CoverletOutput=TestResults/

- name: Generate report
run: reportgenerator -reports:./NetFabric.Angle.UnitTests/Coverage/coverage.netcoreapp3.0.cobertura.xml -targetdir:./NetFabric.Angle.UnitTests/Coverage/Reports
- name: Publish report
uses: 5monkeys/cobertura-action@v1
run: reportgenerator -reports:./NetFabric.Angle.UnitTests/Coverage/coverage.net6.0.cobertura.xml -targetdir:./NetFabric.Angle.UnitTests/Coverage/Reports

- name: Publish coverage report to coveralls.io
uses: coverallsapp/github-action@master
with:
path: ./NetFabric.Angle.UnitTests/Coverage/Reports
repo_token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./NetFabric.Angle.UnitTests/TestResults/coverage.net6.0.info



Expand Down
2 changes: 1 addition & 1 deletion NetFabric.Angle.UnitTests/NetFabric.Angle.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="2.8.0">
<PackageReference Include="coverlet.msbuild" Version="3.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 2 additions & 0 deletions NetFabric.Angle.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Icon.png = Icon.png
LICENSE = LICENSE
README.md = README.md
Directory.Build.props = Directory.Build.props
.github\workflows\dotnetcore.yml = .github\workflows\dotnetcore.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetFabric.Angle.Benchmarks", "NetFabric.Angle.Benchmarks\NetFabric.Angle.Benchmarks.csproj", "{D0011FAE-6913-40EB-A234-73A988003558}"
Expand Down

0 comments on commit 060683b

Please sign in to comment.