Skip to content

Commit

Permalink
Updating test coverage checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerssam committed May 22, 2024
1 parent 45f627b commit 6703b94
Showing 1 changed file with 8 additions and 36 deletions.
44 changes: 8 additions & 36 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,50 +19,22 @@ jobs:
runs-on: ubuntu-22.04
env:
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"
vsni_LICENSE: ${{ secrets.vsni_LICENSE }}
# vsni_LICENSE: ${{ secrets.vsni_LICENSE }}

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-pandoc@v2

- name: Set up RSPM
run: |
echo "options(repos = c(CRAN = 'https://packagemanager.rstudio.com/all/__linux__/focal/latest'))" >> ~/.Rprofile.site
echo "options(HTTPUserAgent = sprintf('R/%s R (%s)', getRversion(), paste(getRversion(), R.version['platform'], R.version['arch'], R.version['os'])))" >> ~/.Rprofile.site
shell: bash

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Get R and OS version
id: get-version
run: |
cat("##[set-output name=os-version;]", sessionInfo()$running, "\n", sep = "")
cat("##[set-output name=r-version;]", R.Version()$version.string, sep = "")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ inputs.cache-version }}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-
use-public-rspm: true

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::covr
needs: check

- name: Create and populate .Renviron file
run: echo vsni_LICENSE="vsni_LICENSE" >> ~/.Renviron
# - name: Create and populate .Renviron file
# run: echo vsni_LICENSE="vsni_LICENSE" >> ~/.Renviron

# - name: Licence ASreml
# run: |
Expand Down

0 comments on commit 6703b94

Please sign in to comment.