From dfbbdd6d28b5e30903e95f09b323b2ca90db1652 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Wed, 29 Jan 2025 18:08:39 -0500 Subject: [PATCH] Run tests with code coverage enabled, and upload coverage to Codecov --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8c925c..d179049 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,4 +44,13 @@ jobs: docker exec -t slurmctld srun -n 4 hostname - name: Test SlurmClusterManager run: | - docker exec -t slurmctld julia -e 'import Pkg; Pkg.activate("SlurmClusterManager"); Pkg.test()' + docker exec -t slurmctld julia -e 'import Pkg; Pkg.activate("SlurmClusterManager"); Pkg.test(; coverage=true)' + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v5 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + # If this PR is from a fork, then do NOT fail CI if the Codecov upload errors. + # If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors. + # If this is not a PR, then DO fail CI if the Codecov upload errors. + fail_ci_if_error: ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}