Skip to content

Commit e290bcb

Browse files
committed
Add Black linting to CI
1 parent 4d9655d commit e290bcb

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,30 @@ jobs:
1515
python-version: [ '3.5', '3.8' ]
1616
steps:
1717
- uses: actions/checkout@v2
18+
1819
- name: Set up Python ${{ matrix.python-version }}
1920
uses: actions/setup-python@v2
2021
with:
2122
python-version: ${{ matrix.python-version }}
23+
2224
- name: Install dependencies
2325
run: |
2426
python -m pip install --upgrade pip
2527
pip install "numpy<1.19.0"
2628
pip install -r test_requirements.txt
2729
pip install pytest-cov
30+
31+
- name: Run Black check for formatting
32+
if: ${{ matrix.python-version != '3.5' }}
33+
run: |
34+
# Need to manually install Black while we support Python 3.5
35+
pip install black
36+
black --check .
37+
2838
- name: Test with pytest
2939
run: |
3040
pytest --cov=./ --cov-report=xml
41+
3142
- name: Upload coverage to Codecov
3243
uses: codecov/codecov-action@v1
3344
with:

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
]
1010

1111
TESTS_REQUIRE = [
12-
'pytest'
12+
'pytest',
13+
# Need to manually install Black while we support Python 3.5
14+
# 'black'
1315
]
1416

1517
EXTRAS_REQUIRE = {

0 commit comments

Comments
 (0)