-
Notifications
You must be signed in to change notification settings - Fork 169
39 lines (31 loc) · 1.05 KB
/
check_black.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This workflow will test the code base using the LATEST version of black
# IMPORTANT: Black is under development. Hence, minor fommatting changes between
# different version are expected.
# If this test fails, install the latest version of black and then run black.
# Preferably, run black only on the files that you have modified.
# This will faciliate the revision of the proposed changes.
name: Check Black
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
- name: Black version
run: black --version
- name: Black check
working-directory: ${{github.workspace}}
run: black --check .