Skip to content

Implement Bolt2 (#16) #48

Implement Bolt2 (#16)

Implement Bolt2 (#16) #48

Workflow file for this run

# 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: 8.0.x
- name: Install xmlstarlet and dotnet-format
run: |
sudo apt-get update && sudo apt-get install -y xmlstarlet
dotnet tool install --global dotnet-format
- name: Restore dependencies
run: dotnet restore
- name: Check code formatting
run: |
dotnet build -c Debug.Wasm
dotnet format --verify-no-changes
- name: Build
run: dotnet build --no-restore
- name: Test
run: ./scripts/testwithcoverage.sh
- name: Filter coverage reports to remove empty packages
run: find ./coverage -name 'coverage.cobertura.xml' -exec xmlstarlet ed -L -d "//package[not(classes/class)]" {} \;
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: xUnit Tests # Name of the check run which will be created
path: coverage/test-results.trx # Path to test results
reporter: dotnet-trx # Format of test results
- name: Upload Artifacts
uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: coverage/test-results.trx
- name: Build for Native Crypto
if: success()
run: dotnet build -c Debug.Native
- name: Test
if: success()
run: ./scripts/testwithcoverage.sh "Debug.Native"