GitHub Action
R minimum dependency check
Resolve and install minimal dependencies for a given package. Execute R CMD CHECK with minimal dependencies installed.
The aim is to check correctness of a DESCRIPTION
file, i.e. minimal dependencies specification.
This covers only direct dependencies, i.e. it does not resolve dependencies of dependencies recursively.
Example:
flowchart LR
A-- imports -->B;
B-- imports -->C;
When executed for A, script would read A's DESCRIPTION
file, determine minimal version of B and install it using latest version of C (i.e. base package installation).
Initial assessment of recursive functionality oftentimes leads to install compilation error of very old packages, errors in historical package releases that are not valid anymore or install requests of archived and not maintained packages. It's hard to decide what to do with it.
The functionality relies heavily on pkgdepends::new_pkg_installation_proposal
and its dependency resolving mechanism.
Composite
Insights Engineering
-
github-token
:Description: Token with permissions to clone repositories with dependencies.
Required:
false
Default:
""
-
repository-path
:Description: Directory where the checked package has been cloned.
Required:
false
Default:
repository
-
check-args
:Description: Optional value of
args
argument torcmdcheck::rcmdcheck
in form of a string with space as delimeter, e.g."--no-examples --no-tests"
.Required:
false
Default:
""
-
build-args
:Description: Optional value of
build_args
argument torcmdcheck::rcmdcheck
in form of a string with space as delimeter, e.g."--force --keep-empty-dirs"
.Required:
false
Default:
""
-
additional-env-vars
:Description: Additional environment variables.
Required:
false
Default:
""
None
name: Minimum dependency check
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
name: Minimum dependency check
container:
image: rocker/tidyverse:4.1.2
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
path: repository
- name: Run dependency check
uses: insightsengineering/r-mindepscheck-action@v1
with:
github-token: ${{ secrets.REPO_GITHUB_TOKEN }}
- name: Upload lock file
if: always()
uses: actions/upload-artifact@v3
with:
name: lock-file
path: pkg.lock