Skip to content

Merge pull request #12 from zivy/dependabot/github_actions/actions/ca… #36

Merge pull request #12 from zivy/dependabot/github_actions/actions/ca…

Merge pull request #12 from zivy/dependabot/github_actions/actions/ca… #36

Workflow file for this run

name: pre-commit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
# The specific pre-commit tests configurations are found in
# the .pre-commit-config.yaml file at the root of the repository
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: set PY (hash of installed Python version)
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit tests
run: |
pip install pre-commit
pre-commit run --all-files