Merge pull request #85 from nGoline/feature/upgrade-dotnet-to-10 #92
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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: NLightning .NET Build & Tests (Push) | |
| on: | |
| push: | |
| branches: [ "*" ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Build | |
| run: dotnet build --configuration Release -p:MSBuildWarningsAsMessages=MSB4121 | |
| - name: Check Code Formatting | |
| run: dotnet format --verify-no-changes --exclude "**/BlazorTests/**" | |
| - name: Test | |
| run: dotnet test --no-build --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage" --filter 'FullyQualifiedName!~Docker' | |
| - name: Combine Coverage Reports | |
| uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4 | |
| with: | |
| reports: "**/*.cobertura.xml" | |
| targetdir: "${{ github.workspace }}" | |
| reporttypes: "Cobertura" | |
| verbosity: "Info" | |
| title: "Code Coverage" | |
| tag: "${{ github.run_number }}_${{ github.run_id }}" | |
| toolpath: "reportgeneratortool" | |
| - name: Upload Combined Coverage XML | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: ${{ github.workspace }}/Cobertura.xml | |
| retention-days: 5 | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2.16.1 | |
| if: always() | |
| with: | |
| trx_files: "${{ github.workspace }}/**/*.trx" |