Fix Codecov and add integration tests coverage (#1020)

* add : gocovmerge support

* fix : minor fix

* add : dependancy for codecov

* fix : dependancy

* fix : codecov upload/download artifact

* fix : fix unable to find cover.out file

* fix : rename integration_cover.out

* chg : codecov-action from v1 to v3
This commit is contained in:
SHIVAM SHARMA 2023-10-13 12:31:17 +05:30 committed by GitHub
parent a5d53af402
commit db1562bbe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions

View file

@ -107,6 +107,11 @@ jobs:
- name: Test
run: make test
- uses: actions/upload-artifact@v2
with:
name: unitTest-coverage
path: cover.out
#- name: Data race tests
# run: make test-race
@ -153,17 +158,25 @@ jobs:
- name: test-integration
run: make test-integration
- uses: actions/upload-artifact@v2
with:
name: integrationTest-coverage
path: cover.out
codecov:
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
strategy:
matrix:
os: [ ubuntu-20.04 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
needs: [unit-tests, integration-tests]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./cover.out
uses: codecov/codecov-action@v3
e2e-tests:
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)

View file

@ -66,8 +66,11 @@ test-txpool-race:
test-race:
$(GOTEST) --timeout 15m -race -shuffle=on $(TESTALL)
gocovmerge-deps:
$(GOBUILD) -o $(GOBIN)/gocovmerge github.com/wadey/gocovmerge
test-integration:
$(GOTEST) --timeout 60m -tags integration $(TESTE2E)
$(GOTEST) --timeout 60m -cover -coverprofile=cover.out -covermode=atomic -tags integration $(TESTE2E)
escape:
cd $(path) && go test -gcflags "-m -m" -run none -bench=BenchmarkJumpdest* -benchmem -memprofile mem.out