Validation Cache Install #2
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: Validation Cache Install | |
| on: | |
| # push: | |
| # branch: | |
| # - main | |
| workflow_dispatch: | |
| jobs: | |
| cache-R-library: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| sparse-checkout: '.github' | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Install system dependencies | |
| run: sudo apt-get install libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libarchive-dev libudunits2-dev libgdal-dev libfontconfig1-dev | |
| - name: Cache R packages | |
| if: runner.os != 'Windows' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: ${{ runner.os }}-${{ hashFiles('.github/requirement_validation.txt') }}-1 | |
| - name: Install dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: | | |
| R -e 'Sys.setenv("NOT_CRAN" = TRUE) | |
| install.packages(c("purrr", "stringr", "gh", "remotes", "jsonlite")) | |
| install.packages("hubValidations", repos = c("https://hubverse-org.r-universe.dev", "https://cloud.r-project.org")) | |
| Sys.unsetenv("NOT_CRAN") | |
| remotes::install_url("https://github.com/midas-network/SMHvalidation/archive/refs/heads/main.zip")' | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |