-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pawel Rucki <[email protected]> Co-authored-by: Franciszek Walkowiak <[email protected]> Co-authored-by: André Veríssimo <[email protected]>
- Loading branch information
1 parent
36c7a0c
commit 0d8c7b4
Showing
6 changed files
with
546 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: CLA 🔏 | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
# For PRs that originate from forks | ||
pull_request_target: | ||
types: | ||
- opened | ||
- closed | ||
- synchronize | ||
|
||
jobs: | ||
CLA: | ||
name: CLA 📝 | ||
uses: insightsengineering/.github/.github/workflows/cla.yaml@main | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: SuperLinter | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
name: Lint Code Base | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Lint Code Base | ||
uses: super-linter/super-linter/slim@v5 | ||
env: | ||
VALIDATE_ALL_CODEBASE: false | ||
DEFAULT_BRANCH: main | ||
VALIDATE_R: true | ||
VALIDATE_YAML: true | ||
VALIDATE_BASH_EXEC: true | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Keep the versions up-to-date ☕️ | ||
|
||
on: | ||
release: | ||
types: [published, edited] | ||
|
||
jobs: | ||
actions-tagger: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: Actions-R-Us/actions-tagger@latest | ||
with: | ||
publish_latest_tag: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
linters: linters_with_defaults( | ||
line_length_linter(120), | ||
commented_code_linter = NULL) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# Setup R Dependencies Action | ||
|
||
## Description | ||
|
||
A wrapper on [`r-lib/actions/setup-r-dependencies`](https://github.com/r-lib/actions/tree/v2-branch/setup-r-dependencies) with additional features as below: | ||
|
||
- Use dependencies from identical feature branch (if exists). This allows to co-develop packages and test them together. | ||
- Use development version of dependencies if specified in the `DESCRIPTION` file. This allows to test packages with dependencies that are not yet released. | ||
|
||
This logic requires additional input of package references to check against. Please see the `lookup-refs` parameter description for more details. Currently, only GitHub references are supported. | ||
|
||
The implementation relies on the `pkgdepends` package and it is temporarily changing the `DESCRIPTION` file by adding new `Config/Needs/` fields. Then `r-lib/actions/setup-r-dependencies` is called with the `needs` parameter. | ||
|
||
## 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 R package is located relative to the calling GitHub workflow workspace. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `"."` | ||
|
||
* `lookup-refs`: | ||
|
||
_Description_: List of [package references](https://r-lib.github.io/pkgdepends/reference/pkg_refs.html) to be used for the feature branch. Multiple entries in new lines or separated by commas. Only GitHub references are supported. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `""` | ||
|
||
* `extra-deps`: | ||
|
||
_Description_: List of extra dependencies to check against feature branch existence. Multiple entries in new lines or separated by commas. It allows to control indirect dependencies. This requires an entry in the `lookup-refs` input. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `""` | ||
|
||
* `dependencies`: | ||
|
||
_Description_: Passed to `r-lib/actions/setup-r-dependencies`. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `"all"` | ||
|
||
* `extra-packages`: | ||
|
||
_Description_: Passed to `r-lib/actions/setup-r-dependencies`. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `""` | ||
|
||
* `needs`: | ||
|
||
_Description_: Passed to `r-lib/actions/setup-r-dependencies`. The value will be amended by `DepsBranch` and `DepsDev` values. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `""` | ||
|
||
* `skip-desc-branch`: | ||
|
||
_Description_: Skip branch lookup for dependencies specified in the `DESCRIPTION` file. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `false` | ||
|
||
* `skip-desc-dev`: | ||
|
||
_Description_: Skip development version lookup for dependencies specified in the `DESCRIPTION` file. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `false` | ||
|
||
* `skip-install`: | ||
|
||
_Description_: Skip installation of dependencies. | ||
|
||
_Required_: `false` | ||
|
||
_Default_: `false` | ||
|
||
|
||
## Outputs | ||
|
||
None | ||
|
||
## Usage | ||
|
||
```yaml | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
|
||
- name: Setup R dependencies | ||
uses: insightsengineering/setup-r-dependencies@v1 | ||
with: | ||
github-token: ${{ secrets.REPO_GITHUB_TOKEN }} | ||
lookup-refs: | | ||
test/package1 | ||
test/package2 | ||
test/package3 | ||
- name: Check R package | ||
uses: r-lib/actions/check-r-package@v2 | ||
``` |
Oops, something went wrong.