-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding the pre-commit hook * Removing adding README.md back to pre-commit * Adding pre-commit to Rbuildignore * Adding pre-commit as dependency * Passing Rscript differently * Get to get the library * Setting up R in pre-commit * Setting up where to install the package and from where * Both can only be used in mac and windows * Adding jammy to the repo * Removing dangling pre-commit file * Setting no cache root * Reverting root cache pre-commit * Running pre-commit alternatively * Update pre-commit.yaml * Correct hooks * Forgot to install it: * Dealing with styler * Revising how to deal with pre-commit * Forcing the R version to be 4.4.1 in precommit R * Adding some contextual information * Reverting how pre-commit works * Adding pre-commit Renv * Need a cache-root maybe
- Loading branch information
Showing
4 changed files
with
22 additions
and
25 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 |
---|---|---|
|
@@ -31,6 +31,7 @@ README\.html | |
|
||
# Adding gitattributes | ||
\.gitattributes | ||
\.pre-commit-config.yaml | ||
|
||
paper\..+ | ||
docker | ||
|
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 |
---|---|---|
|
@@ -10,6 +10,9 @@ on: | |
|
||
jobs: | ||
pre-commit: | ||
|
||
name: Pre-commit | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -19,5 +22,18 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
|
||
- name: Cache R packages for pre-commit (live in renv) | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/R/renv | ||
key: r-precommit-cache|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
# Notice this step depends on what | ||
# https://github.com/lorenzwalthert/precommit has as | ||
# R version in renv.lock. GHA ubuntu-latest runner comes | ||
# with R 4.4.1, which is the same as in renv.lock. If that | ||
# changes, caching will not work as it will be loading a | ||
# different version of R. | ||
- name: Run pre-commit hooks | ||
uses: pre-commit/[email protected] |
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
This file was deleted.
Oops, something went wrong.