From 6f6cc4e133e23da3ab85edb045a66094177a4c9f Mon Sep 17 00:00:00 2001 From: Eva Hamrud <50098063+evaham1@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:30:13 +1100 Subject: [PATCH] print files to see why action cant find coverage report after generation --- .github/workflows/actions.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 3298acd1..f50cde6b 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -230,15 +230,22 @@ jobs: print('Coverage calculated!') saveRDS(cov, 'coverage.rds') print(cov)" + echo "Files in current directory:" + ls -l set -e - name: Upload coverage report to Codecov if: (runner.os == 'Linux' && github.event_name == 'schedule' && github.repository == 'mixOmicsTeam/mixOmics') || (runner.os == 'Linux' && github.event_name == 'workflow_dispatch' && github.repository == 'mixOmicsTeam/mixOmics') run: | set +e - echo "Uploading coverage report to Codecov..." - # Load coverage object from saved file and upload to Codecov - Rscript -e "cov <- readRDS('coverage.rds'); covr::codecov(coverage = cov)" + echo "Checking for coverage.rds file before uploading..." + if [ -f "coverage.rds" ]; then + echo "coverage.rds found, proceeding with upload..." + Rscript -e "cov <- readRDS('coverage.rds'); covr::codecov(coverage = cov)" + else + echo "Error: coverage.rds not found!" + exit 1 + fi set -e env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}