diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 9fbe18d..f1b6fd2 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e9477b7..79088cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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