Skip to content

Commit

Permalink
Update r-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vsyrgkanis authored Jul 2, 2024
1 parent aaf801a commit 62c4e2b
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions .github/workflows/r-tests.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
on:
push:
branches: [main, master, r-tests]
pull_request:
branches: [main, master]
name: Lint R Scripts and Notebooks

name: lint

permissions: read-all
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
folder: [PM1, PM2]
name: Lint ${{ matrix.folder }} folder
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Set up R
uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::lintr, local::.
needs: lint
- name: Install lintr
run: R -e 'install.packages("lintr")'

- name: Lint
run: lintr::lint_dir(path="PM1")
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
- name: Lint R scripts and notebooks in ${{ matrix.folder }}
run: |
R -e 'lintr::lint_dir("${{ matrix.folder }}", linters = lintr::with_defaults())'
continue-on-error: true

0 comments on commit 62c4e2b

Please sign in to comment.