From ea4bb8272086f500c70d1dd3ab6950270f382646 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 19 Apr 2025 00:55:34 +0100 Subject: [PATCH] update GitHub Actions workflow to trigger on pull requests to main and fix output path for coverage report --- .github/workflows/run_tests.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index c992de4..1f59dc0 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,12 +1,16 @@ name: Tests and Coverage -on: [pull_request, push] +on: + pull_request: + branches: + - main jobs: coverage: runs-on: ubuntu-latest env: CARGO_TERM_COLOR: always + steps: - uses: actions/checkout@v4 - name: Install Rust @@ -14,10 +18,10 @@ jobs: - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.infoa - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: - token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + token: ${{ secrets.CODECOV_TOKEN }} files: lcov.info - fail_ci_if_error: true \ No newline at end of file + fail_ci_if_error: true