X10D/.github/workflows/dotnet.yml

66 lines
1.7 KiB
YAML
Raw Normal View History

name: .NET
on:
push:
2023-04-03 17:21:21 +00:00
branches:
- '*'
2023-08-23 15:14:56 +00:00
- '*/*'
pull_request:
2023-04-03 17:21:21 +00:00
branches:
- '*'
2023-08-23 15:14:56 +00:00
- '*/*'
jobs:
build:
name: "Build & Test"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
2023-11-14 16:49:53 +00:00
8.0.x
- name: Add NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
- name: Restore dependencies
run: dotnet restore
- name: Install coverage tools
run: |
dotnet tool install --global JetBrains.dotCover.GlobalTool
dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test .NET 6
run: dotnet test --no-build --verbosity normal --configuration Release --framework net6.0
- name: Test .NET 7
run: dotnet test --no-build --verbosity normal --configuration Release --framework net7.0
2023-11-14 16:49:53 +00:00
- name: Test .NET 8
run: dotnet test --no-build --verbosity normal --configuration Release --framework net8.0
- name: Collect coverage
2024-02-17 16:08:40 +00:00
run: dotnet dotcover test --dcReportType=DetailedXML
- name: Convert coverage
run: reportgenerator -reports:./dotCover.Output.xml -targetdir:. -reporttypes:Cobertura
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.0
with:
disable_search: true
file: Cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
slug: oliverbooth/X10D