Merge pull request #219 from pigs-will-fly/add/generation-time #375
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: 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/[email protected] | |
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 . |