Tests for PR (success) #2
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: Black Check - Delta Changes | |
on: | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
black-check-delta: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11.0 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black | |
- name: Run Black on delta changes | |
run: | | |
git diff --name-only -r HEAD^1 HEAD | grep '\.py$' | xargs black --check |