Skip to content

Commit

Permalink
.github: add Coverage workflow
Browse files Browse the repository at this point in the history
A part of #429.

Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Oct 7, 2024
1 parent 1578339 commit 905a5be
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,34 @@ jobs:
- name: Test
run: go test -v ./...

cover:
name: Coverage
runs-on: ubuntu-22.04

env:
CGO_ENABLED: 0
GOEXPERIMENT: nocoverageredesign
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true

- name: Write coverage profile
run: go test -v ./... -coverprofile=./coverage.txt -coverpkg=./contracts/...

- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # if something is wrong on uploading codecov results, then this job will fail
files: ./coverage.txt
slug: nspcc-dev/neofs-contract
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

build:
name: Build contracts and RPC bindings
runs-on: ubuntu-latest
Expand Down

0 comments on commit 905a5be

Please sign in to comment.