From b54069a61a1aa691215971f33a162665d356b19e Mon Sep 17 00:00:00 2001 From: Rich Bielby Date: Thu, 6 Feb 2025 12:45:58 +0000 Subject: [PATCH] Update lintr.yml --- .github/workflows/lintr.yml | 44 ++++++++++--------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/.github/workflows/lintr.yml b/.github/workflows/lintr.yml index 8dcce39..a4be3b3 100644 --- a/.github/workflows/lintr.yml +++ b/.github/workflows/lintr.yml @@ -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 @@ -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")