Skip to content

Commit

Permalink
Merge pull request #147 from aaronpeikert/readonly
Browse files Browse the repository at this point in the history
Add a test where the library is set to read only
  • Loading branch information
cjvanlissa authored Jan 10, 2025
2 parents ac317a9 + af045fe commit 715b3c2
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/R-check-readonly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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] # Trigger on pushes to main or master
paths:
- .github/workflows/R-check-readonly.yaml # Also trigger if this workflow file changes
pull_request:
branches: [main, master] # Trigger on pull requests targeting main or master
workflow_dispatch: # Allow manual triggers


name: R Testthat Readonly

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- name: Make user library read-only
run: |
Rscript -e 'Sys.chmod(.libPaths()[1], mode = "0555")'
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: false

0 comments on commit 715b3c2

Please sign in to comment.