Skip to content

Add GitHub Actions workflows for build, test, and NuGet publishing #1

Add GitHub Actions workflows for build, test, and NuGet publishing

Add GitHub Actions workflows for build, test, and NuGet publishing #1

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for versioning
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Run tests
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"
- name: Upload coverage reports
uses: codecov/codecov-action@v3
if: success()
with:
file: '**/coverage.cobertura.xml'
fail_ci_if_error: false