Add Coveralls integration

Build and upload lcov-compatible coverage file to coveralls
This commit is contained in:
Arseny Kapoulkine 2021-11-01 09:19:54 -07:00
parent 0ded24c2d5
commit 7f3c033162
2 changed files with 6 additions and 0 deletions

View File

@ -69,6 +69,11 @@ jobs:
- name: make coverage - name: make coverage
run: | run: |
CXX=clang++-10 make -j2 config=coverage coverage 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 - uses: actions/upload-artifact@v2
with: with:
name: coverage name: coverage

View File

@ -107,6 +107,7 @@ coverage: $(TESTS_TARGET)
rm default.profraw default-flags.profraw 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 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 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: format:
find . -name '*.h' -or -name '*.cpp' | xargs clang-format -i find . -name '*.h' -or -name '*.cpp' | xargs clang-format -i