CI: Add black formatting check to validation (#12182)

This commit is contained in:
Adriane Boyd 2023-01-25 12:51:37 +01:00 committed by GitHub
parent 99a05734a8
commit 2dbb764183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,8 +29,9 @@ pr:
- ".github/workflows/*"
jobs:
# Perform basic checks for most important errors (syntax etc.) Uses the config
# defined in .flake8 and overwrites the selected codes.
# Check formatting and linting. Perform basic checks for most important errors
# (syntax etc.) Uses the config defined in setup.cfg and overwrites the
# selected codes.
- job: "Validate"
pool:
vmImage: "ubuntu-latest"
@ -38,6 +39,10 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.7"
- script: |
pip install black==22.3.0
python -m black spacy --check
displayName: "black"
- script: |
pip install flake8==5.0.4
python -m flake8 spacy --count --select=E901,E999,F821,F822,F823,W605 --show-source --statistics