Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing coverage #23

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
runs-on: ${{matrix.platform}}
env:
LLVL: trace
coverage: ${{ matrix.platform == 'ubuntu-latest' && github.repository == 'dedis/dela' }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
Expand All @@ -30,17 +31,17 @@ jobs:
- name: Test without coverage
env:
CRY_LVL: "warn"
if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest'
if: ${{ env.coverage == 'false' }}
run: make test

- name: Test with coverage
env:
CRY_LVL: "warn"
if: matrix.platform == 'ubuntu-latest'
if: ${{ env.coverage == 'true' }}
run: make coverage

- name: Sonarcloud scan
if: matrix.platform == 'ubuntu-latest'
if: ${{ env.coverage == 'true' }}
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
Expand All @@ -53,7 +54,7 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Send coverage
if: matrix.platform == 'ubuntu-latest'
if: ${{ env.coverage == 'true' }}
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
Expand Down
2 changes: 2 additions & 0 deletions core/execution/native/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ func (ns *Service) Execute(snap store.Snapshot, step execution.Step) (execution.
err := contract.Execute(snap, step)
if err != nil {
res.Accepted = false
// LG: DEBUG - I'd like to keep this commented line, as it helps debugging.
// res.Message = fmt.Sprintf("%+v", err)
res.Message = err.Error()
}

Expand Down
2 changes: 2 additions & 0 deletions mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
package dela

import (
"fmt"
"os"
"time"

Expand Down Expand Up @@ -73,6 +74,7 @@ func init() {
default:
level = zerolog.TraceLevel
}
fmt.Println("LogLevel is:", logLevel, level)

Logger = Logger.Level(level)
PromCollectors = append(PromCollectors, promWarns, promErrs)
Expand Down
Loading