Skip to content

now properly cache biocversion (#122) #577

now properly cache biocversion (#122)

now properly cache biocversion (#122) #577

Workflow file for this run

name: R
on:
pull_request:
branches:
- "*"
push:
branches:
- "master"
env:
cache-version: "cache-v1"
jobs:
build:
strategy:
max-parallel: 5
matrix:
config:
- { os: ubuntu-latest }
- { os: windows-latest }
- { os: macos-latest }
runs-on: ${{ matrix.config.os }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- name: Setup R and Bioconductor
uses: grimbough/bioc-actions/setup-bioc@v1
id: install-r
with:
bioc-version: release
- name: Get R version
id: R
run: |
R --version > VERSION
echo "version=$(head -1 VERSION | awk '{print $3}')" >> $GITHUB_OUTPUT
shell: bash -l {0}
- name: Get Bioconductor version
id: BIOC
run: |
echo "version=$R_BIOC_VERSION" >> $GITHUB_OUTPUT
shell: bash -l {0}
- uses: r-lib/actions/setup-pandoc@v2
- name: Cache R packages
uses: actions/cache@v4
with:
path: /home/runner/work/_temp/Library
key: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-${{ steps.BIOC.outputs.version}}-r-${{ steps.R.outputs.version}}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-${{ steps.BIOC.outputs.version}}-r-${{ steps.R.outputs.version}}-
- name: Install and check
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck
covr
pkgdown
needs: check
- name: Test coverage
if: github.actor == 'zktuong' && matrix.config.os == 'ubuntu-latest'
run: |
Rscript -e 'covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")'
shell: bash -l {0}