From e710b97cfd1de2c3be621c217edc93adbb63fcc1 Mon Sep 17 00:00:00 2001 From: LiNk-NY Date: Wed, 14 Aug 2024 15:56:44 -0400 Subject: [PATCH] remove extra steps --- .github/workflows/test-coverage.yml | 47 +++++++---------------------- 1 file changed, 11 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index cbcffd7..0a520f6 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -6,46 +6,28 @@ on: name: test-coverage +permissions: read-all + jobs: test-coverage: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest container: bioconductor/bioconductor_docker:devel env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - CRAN: https://packagemanager.posit.co/cran/__linux__/jammy/latest GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Query dependencies - run: | - BiocManager::install(c("remotes", "covr", "xml2")) - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - shell: Rscript {0} + - uses: actions/checkout@v4 - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v4 + - uses: r-lib/actions/setup-r@v2 with: - path: /usr/local/lib/R/site-library - key: ${{ runner.os }}-r-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-r-1- + use-public-rspm: true - - name: Install Dependencies - run: | - remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories()) - BiocManager::install("rcmdcheck", ask = FALSE, update = TRUE) - shell: Rscript {0} - - - name: Check Package - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error", check_dir = "check") - shell: Rscript {0} + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::covr, any::xml2 + needs: coverage - - name: Test coverage + - name: Run package coverage run: | cov <- covr::package_coverage( quiet = FALSE, @@ -64,10 +46,3 @@ jobs: plugin: noop disable_search: true token: ${{ secrets.CODECOV_TOKEN }} - - - name: Upload artifact on failure - if: failure() - uses: actions/upload-artifact@v4 - with: - name: coverage-test-failures - path: ${{ runner.temp }}/package