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@v4 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@v2.2.1 if: ${{ github.event_name == 'push' }} with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./coveragereport/lcov.info