diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1deca02b..956d489b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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