Merge pull request #216 from pigs-will-fly/dependabot/pip/pytest-cov-… #368
This file contains hidden or 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: Code formatting | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: 3.9 | |
- name: Install black | |
run: | | |
# black==21.7b0 | |
export BLACK_VERSION=$(grep black setup.py | egrep -o '==[0-9a-z.]+' | sed 's/=//g') | |
set -x | |
pip install black==${BLACK_VERSION} | |
- name: Check code formatting | |
run: | | |
black --check . |