From f2f17917d6438368de949433e20adad377cf26fe Mon Sep 17 00:00:00 2001 From: erlingrj Date: Tue, 21 May 2024 22:37:57 +0200 Subject: [PATCH] Revert --- .github/workflows/ci.yml | 5 +++++ .github/workflows/coverage.yml | 20 +++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a066926..e796f75e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,11 @@ jobs: cmake -Bbuild && cd build cmake --build . make test + - name: Upload coverage artifact + uses: actions/upload-artifact@master + with: + name: lcov-info-pr + path: build/coverage.info coverage: uses: ./.github/workflows/coverage.yml if: ${{ github.event_name == 'pull_request' }} \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 761dd64d..545c4615 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -22,22 +22,16 @@ jobs: cmake -Bbuild && cd build cmake --build . make test - cp build/coverage.info /tmp/coverage_main.info - - name: Checkout PR - uses: actions/checkout@v3 + - name: Download coverage artifact + uses: actions/download-artifact@master with: - submodules: recursive - - name: Run tests on main for coverage comparison - run: | - git checkout main - cmake -Bbuild && cd build - cmake --build . - make test + name: lcov-info-pr + path: build_pr/ - name: Coverage uses: romeovs/lcov-reporter-action@2a28ec3e25fb7eae9cb537e9141603486f810d1a with: - lcov-base: /tmp/coverage_main.info - lcov-file: build/coverage.info - delete-old-comments: true + lcov-base: build/coverage.info + lcov-file: build_pr/coverage.info filter-changed-files: true + delete-old-comments: true github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file