Skip to content

Package / Actions Cleanup - Continuation of #435 #838

Package / Actions Cleanup - Continuation of #435

Package / Actions Cleanup - Continuation of #435 #838

Workflow file for this run

name: Black Code Formatter
on: [push, pull_request]
jobs:
black:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Get changed Python files
id: changed-py-files
uses: tj-actions/changed-files@v47
with:
files: |
**.py
- name: Set up Python
if: steps.changed-py-files.outputs.any_changed == 'true'
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install Black
if: steps.changed-py-files.outputs.any_changed == 'true'
run: |
python -m pip install --upgrade pip
pip install black
- name: Check Black Formatting
if: steps.changed-py-files.outputs.any_changed == 'true'
run: black --check ${{ steps.changed-py-files.outputs.all_changed_files }}