2020-04-23 00:49:44 -04:00
|
|
|
name: build
|
2020-04-23 00:47:21 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-12-23 00:34:10 -05:00
|
|
|
branches: [ main ]
|
2020-04-23 00:47:21 -04:00
|
|
|
pull_request:
|
2020-12-23 00:34:10 -05:00
|
|
|
branches: [ main, develop ]
|
2020-04-23 00:47:21 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-04-13 11:56:22 -04:00
|
|
|
- uses: actions/checkout@v3
|
2020-04-23 00:47:21 -04:00
|
|
|
- name: Setup .NET Core
|
2024-01-13 04:54:34 -05:00
|
|
|
uses: actions/setup-dotnet@v4
|
2020-04-23 00:47:21 -04:00
|
|
|
with:
|
2022-04-12 09:54:16 -04:00
|
|
|
dotnet-version: 6.0.x
|
2021-02-02 00:39:20 -05:00
|
|
|
|
2020-04-23 00:47:21 -04:00
|
|
|
- name: Install dependencies
|
2020-11-01 22:55:43 -05:00
|
|
|
run: dotnet restore RulesEngine.sln
|
2021-02-02 00:39:20 -05:00
|
|
|
|
2020-04-23 00:47:21 -04:00
|
|
|
- name: Build
|
2020-11-01 22:55:43 -05:00
|
|
|
run: dotnet build RulesEngine.sln --configuration Release --no-restore
|
2021-02-02 00:39:20 -05:00
|
|
|
|
2020-04-23 00:47:21 -04:00
|
|
|
- name: Test
|
2022-10-01 00:53:01 -04:00
|
|
|
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
|
2021-02-02 00:39:20 -05:00
|
|
|
|
2022-10-01 00:53:01 -04:00
|
|
|
- name: Coveralls GitHub Action
|
2023-07-26 12:33:20 -04:00
|
|
|
uses: coverallsapp/github-action@v2.2.1
|
2020-05-11 07:11:36 -04:00
|
|
|
if: ${{ github.event_name == 'push' }}
|
2022-10-01 00:53:01 -04:00
|
|
|
with:
|
2022-10-02 10:31:51 -04:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-10-01 00:53:01 -04:00
|
|
|
path-to-lcov: ./coveragereport/lcov.info
|