diff --git a/.github/workflows/coverage-local.yml b/.github/workflows/coverage-local.yml index e9d31cc..049f515 100644 --- a/.github/workflows/coverage-local.yml +++ b/.github/workflows/coverage-local.yml @@ -28,16 +28,26 @@ jobs: extra-packages: any::covr needs: coverage + - name: Cache C++ and R dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cache/R + ~/.local/share/R + key: dependencies-${{ runner.os }}-${{ hashFiles('**/DESCRIPTION') }} + restore-keys: | + dependencies-${{ runner.os }}- + - name: Test coverage run: | - Rscript -e "writeLines(as.character(covr::coverage_to_list()$totalcoverage), '${{ runner.temp }}/package/local_cov.Rout')" + Rscript -e "writeLines(as.character(covr::coverage_to_list()$totalcoverage), 'local_cov.Rout')" shell: bash - name: Get Values id: get-values shell: bash run: | - COV=$(echo '${{ runner.temp }}/package/local_conv.Rout') + COV=$(cat '${{ github.workspace }}/local_conv.Rout') echo "coverage=$COV" >> $GITHUB_OUTPUT - name: Checkout gh-pages