Skip to content

Commit

Permalink
Fix file permissions error in style-files pre-commit hook (#49)
Browse files Browse the repository at this point in the history
* Fix file permissions error in `style-files` pre-commit hook by requiring serial execution

* Switch to ccao-data/actions/pre-commit action in pre-commit workflow

* Temporarily pin pre-commit action to time-pre-commit branch

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

This reverts commit f079810.

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

This reverts commit bc23e2d.

* Revert "Temporarily pin pre-commit action to time-pre-commit branch"

This reverts commit f572f30.
  • Loading branch information
jeancochrane authored May 28, 2024
1 parent 14aabe4 commit 2a066b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
28 changes: 3 additions & 25 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
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 @@ -6,6 +6,7 @@ repos:
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
require_serial: true
- id: lintr
- id: readme-rmd-rendered
exclude: reports/README.md
Expand All @@ -25,4 +26,4 @@ repos:
name: Don't commit common R artifacts
entry: Cannot commit .Rhistory, .RData, .Rds or .rds.
language: fail
files: '\.(Rhistory|RData|Rds|rds)$'
files: '\.(Rhistory|RData|Rds|rds)$'

0 comments on commit 2a066b5

Please sign in to comment.