Add a GHA for unexported, unused objects #1013
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Various repo-level tests for code quality | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
name: repo-meta-tests | |
jobs: | |
repo-meta-tests: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: "release" | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: | | |
any::roxygen2 | |
- name: Ensure lint metadata is tested | |
run: | | |
options(crayon.enabled = TRUE) | |
callr::rscript(".dev/lint_metadata_test.R") | |
shell: Rscript {0} | |
- name: Generate some foreign locales | |
run: | | |
sudo locale-gen en_US.utf8 hu_HU.utf8 ja_JP.utf8 | |
- name: Ensure roxygen content matches man directory | |
run: | | |
callr::rscript(".dev/roxygen_test.R") | |
shell: Rscript {0} | |
- name: Ensure defunct linters exist | |
run: | | |
callr::rscript(".dev/defunct_linters_test.R") | |
shell: Rscript {0} | |
- name: Ensure any objects in the namespace are actually needed | |
run: | | |
callr::rscript(".dev/unused_helpers_test.R") | |
shell: Rscript {0} |