diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f66474d6d4..1d8c35d572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,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) diff --git a/Makefile b/Makefile index c14d0dc9f8..cf96d29bf8 100644 --- a/Makefile +++ b/Makefile @@ -65,9 +65,12 @@ 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