Skip to content

test

test #278

Workflow file for this run

name: Run black Formatter
on: [push, pull_request]
jobs:
format:
runs-on: ubuntu-22.04
steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v3
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Step 3: Install black
- name: Install black
run: pip install black
# Step 4: Run black formatter
- name: Run black
run: black .
# Step 5: Commit changes made by black
- uses: EndBug/add-and-commit@v4
with:
author_name: 'Black Formatter Robot'
author_email: '[email protected]'
message: 'Committing black formatting changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}