Skip to content

Commit

Permalink
cach R packages
Browse files Browse the repository at this point in the history
  • Loading branch information
katosh committed Jun 19, 2024
1 parent cf41e16 commit afc41b4
Showing 1 changed file with 34 additions and 14 deletions.
48 changes: 34 additions & 14 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,10 @@ jobs:
any::BiocNeighbors
any::pkgdown
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install anndata
pip install numpy
env:
RETICULATE_PYTHON: /opt/hostedtoolcache/Python/3.8.10/x64/bin/python

- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/Library
path: ~/.R/library
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: ${{ runner.os }}-r-

Expand All @@ -55,6 +42,29 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore R packages cache
uses: actions/cache@v3
with:
path: ~/.R/library
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: ${{ runner.os }}-r-

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install anndata
pip install numpy
env:
RETICULATE_PYTHON: /opt/hostedtoolcache/Python/3.8.10/x64/bin/python

- name: Test coverage
run: |
cov <- covr::package_coverage(
Expand Down Expand Up @@ -93,6 +103,16 @@ jobs:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore R packages cache
uses: actions/cache@v3
with:
path: ~/.R/library
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: ${{ runner.os }}-r-

- name: Build pkgdown site
run: |
pkgdown::build_site()
Expand Down

0 comments on commit afc41b4

Please sign in to comment.