mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-11 07:24:52 +03:00
Run black on the CI with --check option
This commit is contained in:
parent
f3c82aaf60
commit
87ea2c33cc
|
@ -13,8 +13,10 @@ before_install:
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: Tox test
|
- name: Test
|
||||||
script: tox -e py36
|
script: tox -e py36
|
||||||
|
- name: Black
|
||||||
|
script: tox -e black
|
||||||
- name: Basic Docker
|
- name: Basic Docker
|
||||||
script: sh tests/test_docker.sh
|
script: sh tests/test_docker.sh
|
||||||
- name: Docker with Celery
|
- name: Docker with Celery
|
||||||
|
|
|
@ -19,6 +19,9 @@ cd my_awesome_project
|
||||||
# run the project's type checks
|
# run the project's type checks
|
||||||
docker-compose -f local.yml run django mypy my_awesome_project
|
docker-compose -f local.yml run django mypy my_awesome_project
|
||||||
|
|
||||||
|
# Run black with --check option
|
||||||
|
docker-compose -f local.yml run django black --check my_awesome_project
|
||||||
|
|
||||||
# run the project's tests
|
# run the project's tests
|
||||||
docker-compose -f local.yml run django pytest
|
docker-compose -f local.yml run django pytest
|
||||||
|
|
||||||
|
|
6
tox.ini
6
tox.ini
|
@ -1,7 +1,11 @@
|
||||||
[tox]
|
[tox]
|
||||||
skipsdist = true
|
skipsdist = true
|
||||||
envlist = py36
|
envlist = py36,black
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = -rrequirements.txt
|
deps = -rrequirements.txt
|
||||||
commands = pytest {posargs:./tests}
|
commands = pytest {posargs:./tests}
|
||||||
|
|
||||||
|
[testenv:black]
|
||||||
|
deps = black
|
||||||
|
commands = black --check hooks tests setup.py docs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user