diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08c4e6d335..f997dd9e02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,14 @@ jobs: command: | echo "Running Build Tests" make clean - make test + make test-coverage + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + file: coverage.out + token: ${{ secrets.CODECOV_TOKEN }} + slug: zeta-chain/node - name: Build zetacored and zetaclientd env: diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 04988adeb0..277bc9e654 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -216,7 +216,14 @@ jobs: command: | echo "Running Build Tests" make clean - make test + make test-coverage + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + file: coverage.out + token: ${{ secrets.CODECOV_TOKEN }} + slug: zeta-chain/node - name: Build zetacored and zetaclientd if: ${{ github.event.inputs.skip_checks != 'true' }} diff --git a/changelog.md b/changelog.md index 72e28c4550..f2fe3e0815 100644 --- a/changelog.md +++ b/changelog.md @@ -51,6 +51,7 @@ * Added docker-compose and make commands for launching full nodes. `make mainnet-zetarpc-node` `make mainnet-bitcoind-node` * Made adjustments to the docker-compose for launching mainnet full nodes to include examples of using the docker images build from the docker image build pipeline. * [1736](https://github.com/zeta-chain/node/pull/1736) - chore: add Ethermint endpoints to OpenAPI +* [1781](https://github.com/zeta-chain/node/pull/1781) - add codecov coverage report in CI ### Features diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..647094cf84 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,74 @@ +coverage: + round: down + precision: 2 + status: + project: + default: + threshold: 1% # allow this much decrease on project + zetacore: + if_ci_failed: error + target: 60% + flags: + - zetacore + zetaclient: + if_ci_failed: error + target: 60% + flags: + - zetaclient + common: + if_ci_failed: error + target: 60% + flags: + - common + +comment: + layout: "reach, diff, files" + behavior: default + require_changes: true + +flags: + zetacore: + carryforward: true + paths: + - "x/" + zetaclient: + carryforward: true + paths: + - "zetaclient/" + common: + carryforward: true + paths: + - "common/" + +ignore: + - "x/**/client/" + - "x/**/keeper/keeper.go" + - "x/**/keeper/msg_server.go" + - "x/**/keeper/grpc_query_params.go" + - "x/**/types/codec.go" + - "x/**/types/errors.go" + - "x/**/types/keys.go" + - "x/**/types/key_*.go" + - "x/**/types/types.go" + - "x/**/types/expected_keepers.go" + - "x/**/module.go" + - "x/**/module_simulation.go" + - "x/**/simulation/" + - "*.proto" + - "*.md" + - "*.yml" + - "*.yaml" + - "*.pb.go" + - "*.pb.gw.go" + - "*.json" + - ".github/" + - "app/" + - "cmd/" + - "contrib/" + - "docs/" + - "rpc/" + - "proto/" + - "scripts/" + - "server/" + - "testutil/" + - "typescript/" \ No newline at end of file