Skip to content

Commit

Permalink
Update lintr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbielby authored Feb 6, 2025
1 parent 39a2443 commit b54069a
Showing 1 changed file with 12 additions and 32 deletions.
44 changes: 12 additions & 32 deletions .github/workflows/lintr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ permissions:

jobs:
lintr:
runs-on: ${{ matrix.config.os }}

name: Run lintr scanning

strategy:
fail-fast: false
matrix:
config:
# Running on mac as it's quicker to build
- {os: macOS-latest, r: 'release'}

runs-on: ubuntu-latest
container:
image: ghcr.io/dfe-analytical-services/dfe-r-base:latest
options: --user root
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}


permissions:
contents: read # for checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
Expand All @@ -35,31 +33,13 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/checkout@v4

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

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Cache renv packages
uses: actions/cache@v1
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore renv snapshot and install lintr
- name: Restore renv snapshot
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
Expand Down

0 comments on commit b54069a

Please sign in to comment.