Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pre commit workflow to use composite action #33

Closed
2 changes: 0 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
\.lintr$
\.travis\.yml$
^.*\.Rproj$
^.*\.db$
^.*\.db.bz2$
^README\.Rmd$
^\.Rproj\.user$
^\.apt$
Expand Down
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@dfsnow/fix-styler-cache
Loading