From 59b3a6c8d01be785ee015dba1911ee281277e7d3 Mon Sep 17 00:00:00 2001 From: Lz Date: Wed, 30 Mar 2022 11:27:13 +0800 Subject: [PATCH 1/7] fix(devops):upload coverage to Codecov --- .github/workflows/tests.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c1ee840d4..3beab6818 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,13 +22,6 @@ jobs: with: go-version: '1.17' # The Go version to download (if necessary) and use. - # - uses: actions/cache@v2 - # with: - # path: ~/go/pkg/mod - # key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - # restore-keys: | - # ${{ runner.os }}-go- - - name: Clone blobber uses: actions/checkout@v2 @@ -53,13 +46,6 @@ jobs: with: go-version: '1.17' # The Go version to download (if necessary) and use. - # - uses: actions/cache@v2 - # with: - # path: ~/go/pkg/mod - # key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - # restore-keys: | - # ${{ runner.os }}-go- - - name: Clone blobber uses: actions/checkout@v2 @@ -67,6 +53,13 @@ jobs: run: | cd $GITHUB_WORKSPACE/code/go/0chain.net/ CGO_ENABLED=1 go test -tags bn256 -race -coverprofile=coverage.txt -covermode=atomic ./... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + directory: ./code/go/0chain.net/ + fail_ci_if_error: true + files: coverage.txt + integration-tests: name: Integration Tests From a444b650214ac0c46732ed22c7fd63434a3bb4cd Mon Sep 17 00:00:00 2001 From: Lz Date: Wed, 30 Mar 2022 11:36:03 +0800 Subject: [PATCH 2/7] fix(devops):upload coverage to Codecov --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3beab6818..5407db154 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,7 +58,8 @@ jobs: with: directory: ./code/go/0chain.net/ fail_ci_if_error: true - files: coverage.txt + files: ./coverage.txt + verbose: true integration-tests: From 923e203aa3032b16fb60c53f755313655c33f4cd Mon Sep 17 00:00:00 2001 From: Lz Date: Wed, 30 Mar 2022 11:41:20 +0800 Subject: [PATCH 3/7] fix(devops):upload coverage to Codecov --- .github/workflows/tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5407db154..d37e542a6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,12 +56,11 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: - directory: ./code/go/0chain.net/ fail_ci_if_error: true - files: ./coverage.txt + files: $GITHUB_WORKSPACE/code/go/0chain.net/coverage.txt + flags: unittests verbose: true - integration-tests: name: Integration Tests runs-on: [ubuntu-20.04] From 839cec2203c866b753ea3eadcde62600426faa7c Mon Sep 17 00:00:00 2001 From: Lz Date: Wed, 30 Mar 2022 11:47:40 +0800 Subject: [PATCH 4/7] fix(devops):added status badges --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index b1a6d9720..8d0abb628 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ +[![Build](https://github.com/0chain/blobber/actions/workflows/build-&-publish-docker-image.yml/badge.svg)](https://github.com/0chain/blobber/actions/workflows/build-&-publish-docker-image.yml) +[![Test](https://github.com/0chain/blobber/actions/workflows/test.yml/badge.svg)](https://github.com/0chain/blobber/actions/workflows/tests.yml) +[![GoDoc](https://godoc.org/github.com/0chain/blobber?status.png)](https://godoc.org/github.com/0chain/blobber) +[![codecov](https://codecov.io/gh/0chain/blobber/branch/main/graph/badge.svg)](https://codecov.io/gh/0chain/blobber) + # Blobber Setup This readme provide instructions on how to run blobber locally From 0b3ee3d740beaf73dee5ad9065da0d12b60b7646 Mon Sep 17 00:00:00 2001 From: Lz Date: Wed, 30 Mar 2022 11:48:21 +0800 Subject: [PATCH 5/7] fix(devops):added status badges --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d0abb628..43d046c1f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build](https://github.com/0chain/blobber/actions/workflows/build-&-publish-docker-image.yml/badge.svg)](https://github.com/0chain/blobber/actions/workflows/build-&-publish-docker-image.yml) -[![Test](https://github.com/0chain/blobber/actions/workflows/test.yml/badge.svg)](https://github.com/0chain/blobber/actions/workflows/tests.yml) +[![Test](https://github.com/0chain/blobber/actions/workflows/tests.yml/badge.svg)](https://github.com/0chain/blobber/actions/workflows/tests.yml) [![GoDoc](https://godoc.org/github.com/0chain/blobber?status.png)](https://godoc.org/github.com/0chain/blobber) [![codecov](https://codecov.io/gh/0chain/blobber/branch/main/graph/badge.svg)](https://codecov.io/gh/0chain/blobber) From 88ad017bc27759147d029ee7236a564a4d3723b1 Mon Sep 17 00:00:00 2001 From: Lz Date: Wed, 30 Mar 2022 11:50:39 +0800 Subject: [PATCH 6/7] fix(devops):upload coverage to Codecov --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d37e542a6..efc535fd4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -57,7 +57,7 @@ jobs: uses: codecov/codecov-action@v2 with: fail_ci_if_error: true - files: $GITHUB_WORKSPACE/code/go/0chain.net/coverage.txt + files: ./code/go/0chain.net/coverage.txt flags: unittests verbose: true From 6b9b83e237823ec88b23b81cd10a75e2f7c36fed Mon Sep 17 00:00:00 2001 From: Lz Date: Wed, 30 Mar 2022 11:54:12 +0800 Subject: [PATCH 7/7] fix(devops):upload coverage to Codecov --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index efc535fd4..b45c6cdb2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,9 +56,9 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: - fail_ci_if_error: true + # fail_ci_if_error: true files: ./code/go/0chain.net/coverage.txt - flags: unittests + flags: Unit-Tests verbose: true integration-tests: