Skip to content

Commit

Permalink
Use URL
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Apr 2, 2024
1 parent 07a3b56 commit 695a6b1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
^LICENSE.md$
^action.yml$
^entrypoint.sh$
^.*_recheck$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.Rproj.user
.Rhistory
revdeps
*_recheck
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,29 @@ Some helpers to run a reverse dependency check using the same tools as CRAN.

## Goals and limitations

A reverse dependency check is not a red/green test. You should see it more as a
diagnostic tool to identify potential issues to investigate.
A reverse dependency check is not a red/green CI test. You should see it more as a
diagnostic tool to identify potential issues that may need further investigation.

Checks results from other packages are be influenced by all sorts of factors
Checks from other packages are influenced by all sorts of factors
specific to the platform, hardware, network, system setup, or just plain random.
We try to create a setup and get results similar to CRAN, but we need to make
some trade offs to keep this practical.

Our goal of to provide a simple tool that can run on free infrastructure which
allows you to check for potential problems with reverse dependencies during the
development process. It is up to you to interpret these check results, and
possibly compare them against what you can see on CRAN to identify regressions.
We try to create a setup similar to CRAN, but we need to make trade offs to
keep this practical.

The goal of to provide a simple tool that can run on free infrastructure to quickly
check for potential problems with reverse dependencies of your package. It is still
up to you to interpret the check results, and possibly compare them against other
results to identify regressions.

## Supported platfroms

In theory you can do this on any platform, however there is an important caveat:
In theory this works on any platform but in practice there is an important caveat:

To be able check some reverse dependencies, we first need to install all dependencies
(including Suggests) for each package. Many CRAN packages indirectly depend on 100+
other packages, so this quickly adds up.

Even if your package only has a handful of revdeps, you may need to install over a
thousand packages before even starting the revdep check. For this reason it is
thousand other packages, before even starting the revdep check. For this reason it is
only practical to do this on platforms for which precompiled R binary packages
are available.

Expand All @@ -46,14 +45,17 @@ CRAN Debian server. Therefore we do not need to worry about system requirements:
if the package can be built on CRAN, it can also build in the rcheckserver containers.


## How to use
## How to use in local R

This will check your package and reverse dependencies from CRAN:
This will check your package and reverse dependencies from CRAN in your local R:

```r
recheck::recheck("mypackage_1.0.tar.gz")
```

To run this on GitHub actions use:

```
```

5 changes: 2 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ inputs:
runs:
using: 'docker'
image: 'docker://ghcr.io/r-universe-org/recheck'
env:
PACKAGE: ${{ inputs.package }}
UNIVERSE: ${{ inputs.universe }}
args:
- ${{ inputs.package }}
8 changes: 6 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
set -e
nohup Xvfb :6 -screen 0 1280x1024x24 > ~/X.log 2>&1 &
export DISPLAY=:6
echo "Reverse dependency check for: ${PACKAGE}"
Rscript -e "recheck::recheck('${PACKAGE}')"
if [ -z "$1" ]; then
echo "You need to pass a package tarball path or URL"
exit 1
fi
echo "Reverse dependency check for: ${1}"
Rscript -e "recheck::recheck('${1}')"
echo "Action complete!"

0 comments on commit 695a6b1

Please sign in to comment.