diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 62d538b..bb592d8 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -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- @@ -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( @@ -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()