Skip to content

Commit

Permalink
Fix file permissions error in style-files pre-commit hook (#37)
Browse files Browse the repository at this point in the history
* Switch to ccao-data/actions/pre-commit action in pre-comit workflow

* Fix file permissions error in `style-files` pre-commit hook by requiring serial execution

* Empty commit to try to reset GH workflow

* Upgrade precommit R hooks to a more recent version
  • Loading branch information
jeancochrane committed Jun 3, 2024
1 parent f0b4b82 commit f505712
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
26 changes: 2 additions & 24 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,5 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install pre-commit
run: python -m pip install pre-commit
shell: bash

- name: Freeze dependencies
run: python -m pip freeze --local
shell: bash

- name: Cache pre-commit environment
uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
~/.cache/R
key: pre-commit-3-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
shell: bash
- name: Run pre-commit checks
uses: ccao-data/actions/pre-commit@main
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
# R specific hooks: https://github.com/lorenzwalthert/precommit
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9013
rev: v0.4.2
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
require_serial: true
- id: use-tidy-description
- id: lintr
- id: readme-rmd-rendered
Expand Down

0 comments on commit f505712

Please sign in to comment.