RulesEngine/.github/workflows/dotnetcore-build.yml

42 lines
1.1 KiB
YAML

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore RulesEngine.sln
- name: Build
run: dotnet build RulesEngine.sln --configuration Release --no-restore
- name: Test
run: dotnet test RulesEngine.sln --collect:"XPlat Code Coverage" --no-build --configuration Release --verbosity m
- name: Generate Report
shell: pwsh
run: ./scripts/generate-coverage-report.ps1
- name: Check Coverage
shell: pwsh
run: ./scripts/check-coverage.ps1 -reportPath coveragereport/Cobertura.xml -threshold 96
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@1.1.3
if: ${{ github.event_name == 'push' }}
with:
github-token: ${{ secrets.COVERALLS_TOKEN }}
path-to-lcov: ./coveragereport/lcov.info