Skip to content

Update build_test.yml #13

Update build_test.yml

Update build_test.yml #13

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 -p:DeterministicSourcePaths=false -p:DebugType=pdbonly
- name: Test
run: dotnet test -p:CollectCoverage=true -p:CoverletOutput=testResult/ -p:CoverletOutputFormat=opencover --no-build -p:Exclude=[*]*tests?*%2c[*]SharpGram.Tl.*%2c[*]SharpGram.Models.* -p:ExcludeByFile="*.g.*" -p:Include=[SharpGram.Client]*%2c[SharpGram.Core]*
- name: Create Test Coverage Badge
uses: simon-k/[email protected]
id: create_coverage_badge
with:
label: Test Coverage
color: brightgreen
path: Tests/SharpGram.Tests/testResult/coverage.opencover.xml
gist-filename: sharpgram-coverage.json
gist-id: 7e37706c2cdef28ee452cd83721f6a3c
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }}