Skip to content

Setup codecov

Setup codecov #61

Workflow file for this run

name: Build & Test Main
on:
push:
branches: [ main ]
workflow_dispatch:
env:
NETCORE_VERSION: |
6.0.x
8.0.x
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_FEED: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ secrets.NUGET_KEY }}
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET Core ${{ env.NETCORE_VERSION }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.NETCORE_VERSION }}
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release /warnaserror
- name: Run Tests
run: dotnet test --no-build -c Release --collect:"XPlat Code Coverage"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: test