Skip to content

insightsengineering/r-verdepcheck-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

R Version Dependency Check Action

Description

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;
Loading

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.

Action type

Composite

Author

Insights Engineering

Inputs

  • 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 to rcmdcheck::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 to rcmdcheck::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: ""

Outputs

None

Usage

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

About

Github Action to check if R package works correctly with minimum version of dependencies installed

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages