Update versions of pre-commit tools #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validation | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
validation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pre-commit | |
- name: Cache for pre-commit | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache_pre-commit | |
with: | |
path: ~/.cache/pre-commit_env | |
key: ${{ env.cache-name }}_${{ env.pythonLocation }}_${{ hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: | | |
- ${{ env.cache-name }}_${{ env.pythonLocation }} | |
- ${{ env.cache-name }} | |
- name: Run pre-commit hooks | |
run: pre-commit run --all-files --show-diff-on-failure --color=always |