[To rc/1.1] Add FlushChunkMetadataListener (#328) #497
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage | |
on: | |
push: | |
branches: | |
- develop | |
- rc/* | |
paths-ignore: | |
- 'docs/**' | |
pull_request: | |
branches: | |
- develop | |
- rc/* | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
codecov: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/tsfile' || github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2- | |
- name: Generate code coverage reports | |
run: | | |
sudo apt-get install lcov | |
./mvnw -B -P with-java,with-cpp,with-python,with-code-coverage clean verify | |
lcov --capture --directory cpp/target/build/test --output-file cpp/target/build/test/coverage.info | |
lcov --remove cpp/target/build/test/coverage.info '*/tsfile/cpp/test/*' --output-file cpp/target/build/test/coverage_filtered.info | |
genhtml cpp/target/build/test/coverage_filtered.info --output-directory cpp/target/build/test/coverage_report | |
rm -rf cpp/target/build/test/CMakeFiles/TsFile_Test.dir | |
rm -rf cpp/target/build/test/coverage.info | |
- name: Upload coverage reports to codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: java/tsfile/target/jacoco-merged-reports/jacoco.xml,cpp/target/build/test/coverage_report/index.html |