Skip to content

Finished version comparison functions #162

Finished version comparison functions

Finished version comparison functions #162

on:
push:
branches:
- main
- dev
#pull_request:
# branches:
# - master
#schedule:
# * is a special character in YAML so we have to quote this string
# 3am Pacific = 11am UTC
# https://crontab.guru is your friend
# - cron: '0 17 * * *'
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-22.04
env:
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"
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 }}-
- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
- name: Create and populate .Renviron file
run: echo vsni_LICENSE="vsni_LICENSE" >> ~/.Renviron
# - name: Licence ASreml
# run: |
# remotes::install_github("")
# biometryassist::install_asreml()
# shell: Rscript {0}
- name: Test coverage
run: covr::codecov()
shell: Rscript {0}