Skip to content

Removed pytest from pre-commit #7

Removed pytest from pre-commit

Removed pytest from pre-commit #7

Workflow file for this run

name: Python Linting and Formatting
on: [push, pull_request]
jobs:
lint-and-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit install
- name: Run pre-commit hooks
run: |
pre-commit run --all-files # Run all the hooks defined in .pre-commit-config.yaml
- name: Commit formatted files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff --quiet && exit 0
git commit -m "Auto-format Python files with pre-commit hooks"
git push