Merge pull request #107 from tomers/tomer_fixes #1
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: Perform pre-commit checks | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
# Initialization | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
# Cache | |
- name: Load pre-commit hooks cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-checks-hooks-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
# Install and run pre-commit | |
- name: Install pre-commit | |
run: python -m pip install pre-commit | |
- name: List package versions | |
run: python -m pip freeze --local | |
- name: RUN PRE-COMMIT | |
run: SKIP=no-commit-to-branch pre-commit run --show-diff-on-failure --color=always --all-files |