add renv lock file to reproduce env #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: R Restore and Run | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| r-restore: | |
| runs-on: ubuntu-latest | |
| env: | |
| RENV_PATHS_ROOT: ~/.local/share/renv # persistent cache location | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Cache R packages (renv) | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RENV_PATHS_ROOT }} | |
| key: ${{ runner.os }}-renv-${{ hashFiles('renv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-renv- | |
| - name: Restore environment from renv.lock | |
| run: | | |
| install.packages("renv", repos = "https://cloud.r-project.org") | |
| renv::restore(prompt = FALSE) | |
| shell: Rscript {0} | |
| - name: Get data | |
| run: Rscript visium/download-test-data.R | |
| - name: Run visium quality assessment | |
| run: Rscript visium/01_quality_assessment/quality_assessment.qmd |