Skip to content

[113] Bug fixing Stake Contract / Unstake #980

[113] Bug fixing Stake Contract / Unstake

[113] Bug fixing Stake Contract / Unstake #980

Workflow file for this run

name: .NET CI
on: [pull_request]
permissions:
pull-requests: write
actions: write
issues: write
contents: write
env:
GITHUB_TOKEN: ${{ secrets.PR_KEY }}
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
GITHUB_TOKEN: ${{ secrets.PR_KEY }}
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: |
sudo apt-get install libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev
sudo apt-get install libc6-dev libicu-dev libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev librocksdb-dev
sudo apt-get install librocksdb-dev
dotnet tool install --global dotnet-reportgenerator-globaltool
dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Combine Coverage Output
run: reportgenerator "-reports:coverage/**/coverage.cobertura.xml" -targetdir:"coverage" -reporttypes:Cobertura -assemblyfilters:"-Phantasma.Tendermint;-Phantasma.Tendermint.RPC;-Phantasma.Business.Tests;-Phantasma.Core.Tests;-phantasma-node;-Phantasma.Tests;-Phantasma.Infrastructure"
- name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/Cobertura.xml
badge: true
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: false
indicators: true
output: both
thresholds: '60 80'
- name: Upload Coverage Results
uses: actions/upload-artifact@v3
with:
name: my-artifact
path: ${{ github.workspace }}
#- name: Add Coverage PR Comment
# uses: marocchino/sticky-pull-request-comment@v2
# if: github.event_name == 'pull_request'
# with:
# recreate: true
# path: code-coverage-results.md
# GITHUB_TOKEN: ${{github.token}}