Execute R CMD CHECK using various strategies of package dependencies versions.
The aim is to check correctness of a DESCRIPTION
file, i.e. minimal version of dependencies.
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 version of B and install it using latest version of C (i.e. base package installation).
Please see verdepcheck
package documentation for details.
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
-
extra-deps
:Description: Extra dependencies specified similarly as in the
DESCRIPTION
file, i.e."<package name> (<operator> <version>)"
where both<operator>
and<version>
are optional. Multiple entries are possible separated by";"
.Required:
false
Default:
""
-
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:
""
-
strategy
:Description: Strategy for dependency test, should be one of: min, release, max.
Required:
true
-
additional-env-vars
:Description: Additional environment variables.
Required:
false
Default:
""
None
name: Dependency Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
name: Dependency Test
container:
image: rocker/tidyverse:4.4.1
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
path: repository
- name: Run Dependency Test
uses: insightsengineering/r-verdepcheck-action@latest
with:
github-token: ${{ secrets.REPO_GITHUB_TOKEN }}
strategy: release
- name: Upload lock file
if: always()
uses: actions/upload-artifact@v3
with:
name: lock-file
path: pkg.lock