We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de6a577 commit cce209bCopy full SHA for cce209b
1 file changed
.github/workflows/black.yml
@@ -0,0 +1,29 @@
1
+name: Black
2
+
3
+on: [push, pull_request]
4
5
+jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ python-version: ["3.8", "3.9", "3.10"]
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - name: Set up Python ${{ matrix.python-version }}
14
+ uses: actions/setup-python@v3
15
+ with:
16
+ python-version: ${{ matrix.python-version }}
17
+ - name: Install dependencies
18
+ run: |
19
+ python -m pip install --upgrade pip
20
+ pip install black
21
+ - name: Format all py files using black
22
23
+ black $(git ls-files '*.py')
24
+ - name: Commit changes
25
26
+ git config --local user.email "action@github.com"
27
+ git config --local user.name "GitHub Action"
28
+ git add .
29
+ git diff-index --quiet HEAD || git commit -m "Format Python code with Black"
0 commit comments