Merge main
into develop
#1865
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: Pre-commit checks | |
on: pull_request | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: "pip" # caching pip dependencies | |
- name: Install pre-commit | |
run: | | |
pip install 'pre-commit==3.3.2' | |
pre-commit install | |
- name: Set env variables | |
run: | | |
echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | |
echo "PRECOMMIT=$(pip list | grep pre-commit)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ env.PY }}|${{ env.PRECOMMIT }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Run all pre-commit checks | |
# TODO: remove skip once files are clean | |
run: SKIP=isort pre-commit run --all-files --hook-stage manual -c .pre-commit-config.yaml |