Skip to content

Commit

Permalink
Update pre-commit work flow
Browse files Browse the repository at this point in the history
  • Loading branch information
maabuu committed Nov 21, 2023
1 parent 09111de commit 5e76aa0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,29 @@ jobs:
steps:

- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Cache for pre-commit
id: cache-pre-commit
uses: actions/cache@v3
env:
cache-name: cache_pre-commit
cache-name: pre-commit-environment
with:
path: ~/.cache/pre-commit_env
key: ${{ env.cache-name }}_${{ env.pythonLocation }}_${{ hashFiles('.pre-commit-config.yaml') }}
# pre-commit cache files are stored in `~/.cache/pre-commit` by default
path: ~/.cache/pre-commit
key: ${{ runner.os }}_${{ env.cache-name }}
restore-keys: |
- ${{ env.cache-name }}_${{ env.pythonLocation }}
- ${{ runner.os }}_${{ env.cache-name }}
- ${{ env.cache-name }}
Expand Down

0 comments on commit 5e76aa0

Please sign in to comment.