diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000000..0231b49b609 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,23 @@ +on: [pull_request, push] + +name: Code Coverage + +jobs: + coverage_report: + name: Generate coverage report + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4.1.1 + - name: Build + run: | + sudo apt-get -y install lcov llvm + ./autogen.sh + ./configure --enable-lcov --enable-lcov-branch-coverage --without-bdb CC=clang CXX=clang++ + make -j4 total_coverage.info + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./total_coverage.info + fail_ci_if_error: false # optional (default = false) + verbose: true # optional (default = false)