Skip to content

Feature/refactor

Feature/refactor #2

Workflow file for this run

name: Formatting and Linting
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
setup-build-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
pre-commit-${{ runner.os }}-
- name: Run pre-commit checks
working-directory: ${{ github.workspace }}
run: |
pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks
# Run pre-commit checks
pre-commit run --show-diff-on-failure --color=always --all-files