Skip to content

Feat/leaderboard

Feat/leaderboard #149

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 build & test
on:
pull_request:
branches: [ "main" ]
defaults:
run:
working-directory: QuizAppApi
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.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=TestResults/ -p:CoverletOutputFormat=opencover --no-build --verbosity normal
- name: Create Test Coverage Badge
uses: simon-k/dotnet-code-coverage-badge@v1.0.0
id: create_coverage_badge
with:
label: Unit Test Coverage
color: brightgreen
path: QuizAppApi/Tests/TestResults/coverage.opencover.xml
gist-filename: code-coverage.json
gist-id: f04a7acd2cbaa647c6515030113c444b
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }}