2025 efficient python dockerfile #83
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: Python Linting and formatting with Ruff | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install Ruff | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff | |
- run: | | |
ruff format | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'Code formatted with Ruff' |