Reactivate DoDisturbance filtering in MAIN #341
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: CODECOV-check | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| # Increment this version when we want to clear cache | |
| env: | |
| cache-version: v1 | |
| r-version: 4.1 | |
| jobs: | |
| CODECOV-check: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| r-version: ${{ env.r-version }} | |
| - uses: r-lib/actions/setup-r@v3 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - name: Query dependencies | |
| run: | | |
| install.packages('remotes') | |
| saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
| shell: Rscript {0} | |
| - name: Cache R packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: ${{ env.cache-version }}-${{ runner.os }}-${{ env.r-version }}-${{ hashFiles('.github/depends.Rds') }} | |
| restore-keys: ${{ env.cache-version }}-${{ runner.os }}-${{ env.r-version }}- | |
| - name: Install system dependencies on Linux | |
| run: | | |
| sudo apt install libgdal-dev libproj-dev libgeos-dev libudunits2-dev libgfortran5 | |
| while read -r cmd | |
| do | |
| eval sudo $cmd | |
| done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') | |
| - name: Install dependencies | |
| run: | | |
| remotes::install_deps(dependencies = TRUE) | |
| remotes::install_cran("covr") | |
| shell: Rscript {0} | |
| - name: Test coverage | |
| run: | | |
| R CMD INSTALL . | |
| Rscript -e 'covr::codecov()' | |