38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master, develop ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup .NET Core
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 3.1
|
|
- name: Install minicover
|
|
run: dotnet tool install --global minicover --version 3.0.6
|
|
- name: Install dependencies
|
|
run: dotnet restore RulesEngine.sln
|
|
- name: Build
|
|
run: dotnet build RulesEngine.sln --configuration Release --no-restore
|
|
- name: Instrument
|
|
run: minicover instrument
|
|
- name: Test
|
|
run: dotnet test RulesEngine.sln --no-build --configuration Release --verbosity m
|
|
- name: Uninstrument
|
|
run: minicover uninstrument
|
|
- name: Report
|
|
run: minicover report --threshold 95
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
- name: Report coveralls
|
|
run: minicover coverallsreport --repo-token ${{ secrets.COVERALLS_TOKEN }} --branch master
|
|
if: ${{ github.event_name == 'push' }}
|