Skip to content

Commit

Permalink
Update pre-commit action
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsnow committed Jul 15, 2023
1 parent c787af3 commit d1144b8
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,31 @@ name: pre-commit
jobs:
pre-commit:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3

# Replacement for pre-commit/action
- uses: actions/checkout@v3

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

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

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

- run: pre-commit run --show-diff-on-failure --color=always --all-files
- 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

0 comments on commit d1144b8

Please sign in to comment.