Skip to content

Update build_test.yml #4

Update build_test.yml

Update build_test.yml #4

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 --no-restore
- name: Test
run: dotnet test -p:CollectCoverage=true -p:CoverletOutput=../../.github/tests/ -p:CoverletOutputFormat=opencover --no-build --verbosity normal
- name: Create Test Coverage Badge
uses: simon-k/[email protected]
id: create_coverage_badge
with:
label: Unit Test Coverage
color: brightgreen
path: ../../.github/tests/coverage.opencover.xml
gist-filename: sharpgram-coverage.json
gist-id: 7e37706c2cdef28ee452cd83721f6a3c
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }}