Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:

name: lint.yaml

permissions: read-all

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install git2r dependencies
run: sudo apt-get install -y libgit2-dev

- name: Install proj library (terra depdencies)
run: sudo apt-get install libproj-dev

- name: Install gdal library (terra dependencies)
run: sudo apt-get install libgdal-dev

- name: Install udunits library (units dependencies)
run: sudo apt-get install libudunits2-dev

- name: Cache renv packages
id: cache-renv
uses: actions/cache@v4
with:
path: cache-renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-

- uses: r-lib/actions/setup-renv@v2

- name: Restore renv snapshot
shell: Rscript {0}
run: |
if (!requireNamespace("lintr", quietly = TRUE)) install.packages("lintr")

- name: Lint
run: lintr::lint_dir()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
53 changes: 0 additions & 53 deletions .github/workflows/lintr.yml

This file was deleted.

5 changes: 2 additions & 3 deletions .github/workflows/tidyCode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ jobs:
- name: Tidy code
shell: Rscript {0}
run: |
source("global.R")

codeChecks <- tidy_code()

codeChecks <- dfeshiny::tidy_code()

if(any(is.na(codeChecks))) {
stop("There is a breaking error in the code.")
Expand Down