Skip to content

Update r-tests.yml

Update r-tests.yml #4

Workflow file for this run

name: Lint R Scripts and Notebooks
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
folder: [PM1, PM2]
name: Lint ${{ matrix.folder }} folder
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install lintr
run: R -e 'install.packages("lintr")'
- name: Lint R scripts and notebooks in ${{ matrix.folder }}
run: |
R -e 'files <- list.files("${{ matrix.folder }}", pattern = "\\.(R|r|Rmd|rmd|irnb)$", full.names = TRUE);
linters <- lintr::with_defaults(line_length_linter = lintr::line_length_linter(119));
lapply(files, lintr::lint, linters = linters);'
continue-on-error: true