diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 000000000..e1493db19 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,24 @@ +name: "Codecov" + +# Enabling on each push is to display the coverage changes in every PR, +# where each PR needs to be compared against the coverage of the head commit +on: [push, pull_request] + +jobs: + code-coverage: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install lcov and run test + run: | + sudo apt-get install lcov + make lcov + + - name: Upload code coverage + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./src/valkey.info \ No newline at end of file diff --git a/README.md b/README.md index 67b65473e..b958a90b6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![codecov](https://codecov.io/gh/valkey-io/valkey/graph/badge.svg?token=KYYSJAYC5F)](https://codecov.io/gh/valkey-io/valkey) + This README is under construction as we work to build a new community driven high performance key-value store. This project was forked from the open source Redis project right before the transition to their new source available licenses. diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..c8d096e44 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,19 @@ +coverage: + status: + patch: + default: + informational: true + project: + default: + informational: true + +comment: + require_changes: false + require_head: false + require_base: false + layout: "condensed_header, diff, files" + hide_project_coverage: false + behavior: default + +github_checks: + annotations: false \ No newline at end of file diff --git a/src/Makefile b/src/Makefile index 5594b6766..abe88339c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -504,8 +504,9 @@ test-cluster: $(REDIS_SERVER_NAME) $(REDIS_CLI_NAME) check: test lcov: + @lcov --version $(MAKE) gcov - @(set -e; cd ..; ./runtest --clients 1) + @(set -e; cd ..; ./runtest) @geninfo -o redis.info . @genhtml --legend -o lcov-html redis.info