From 7f3c03316201c05217190b17835bcf86aa2e878a Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 1 Nov 2021 09:19:54 -0700 Subject: [PATCH] Add Coveralls integration Build and upload lcov-compatible coverage file to coveralls --- .github/workflows/build.yml | 5 +++++ Makefile | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1b914a7..a1c9db5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,6 +69,11 @@ jobs: - name: make coverage run: | CXX=clang++-10 make -j2 config=coverage coverage + - name: upload coverage + uses: coverallsapp/github-action@master + with: + path-to-lcov: ./coverage.info + github-token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/upload-artifact@v2 with: name: coverage diff --git a/Makefile b/Makefile index 0056870b..dd63ffbe 100644 --- a/Makefile +++ b/Makefile @@ -107,6 +107,7 @@ coverage: $(TESTS_TARGET) rm default.profraw default-flags.profraw llvm-cov show -format=html -show-instantiations=false -show-line-counts=true -show-region-summary=false -ignore-filename-regex=\(tests\|extern\)/.* -output-dir=coverage --instr-profile default.profdata build/coverage/luau-tests llvm-cov report -ignore-filename-regex=\(tests\|extern\)/.* -show-region-summary=false --instr-profile default.profdata build/coverage/luau-tests + llvm-cov export -ignore-filename-regex=\(tests\|extern\)/.* -format lcov --instr-profile default.profdata build/coverage/luau-tests >coverage.info format: find . -name '*.h' -or -name '*.cpp' | xargs clang-format -i