Skip to content

Documentation and formatting #244

Documentation and formatting

Documentation and formatting #244

name: CI
on:
push:
pull_request:
branches: [main]
paths:
- "**.cs"
- "**.csproj"
env:
DOTNET_VERSION: "8.0.300" # The .NET SDK version to use
jobs:
build-and-test:
name: build-and-test-${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
defaults:
run:
working-directory: src
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup .NET 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-restore --verbosity normal -p:CollectCoverage=true -p:CoverletOutput=TestResults/ -p:CoverletOutputFormat=opencover
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request' }}