Remove extra semicolon + add tasks file to lint check + move tox.ini to top-level dir (#1799)
This commit is contained in:
Родитель
5f5130c488
Коммит
43fe73d412
|
@ -14,7 +14,7 @@ before_script:
|
|||
- psql -c 'create database network;' -U postgres
|
||||
script:
|
||||
- npm test
|
||||
- pipenv run flake8 network-api/
|
||||
- pipenv run flake8 tasks.py network-api/
|
||||
- pipenv run coverage run --source './network-api/networkapi' network-api/manage.py test networkapi
|
||||
after_success:
|
||||
- coveralls
|
||||
|
|
|
@ -52,7 +52,7 @@ test_script:
|
|||
- node --version
|
||||
- npm --version
|
||||
- npm test
|
||||
- "python -m pipenv run flake8 network-api/"
|
||||
- "python -m pipenv run flake8 tasks.py network-api/"
|
||||
- "python -m pipenv run python network-api/manage.py test"
|
||||
|
||||
cache:
|
||||
|
|
7
tasks.py
7
tasks.py
|
@ -64,7 +64,7 @@ def l10n_update(ctx):
|
|||
def test(ctx):
|
||||
"""Run tests"""
|
||||
print("Running flake8")
|
||||
ctx.run(f"pipenv run flake8 network-api", **PLATFORM_ARG)
|
||||
ctx.run(f"pipenv run flake8 tasks.py network-api", **PLATFORM_ARG)
|
||||
print("Running tests")
|
||||
manage(ctx, "test")
|
||||
|
||||
|
@ -81,7 +81,7 @@ def setup(ctx):
|
|||
ctx.run("pipenv install --dev")
|
||||
print("Applying database migrations.")
|
||||
ctx.run("inv migrate")
|
||||
print("Updating localizable fields");
|
||||
print("Updating localizable fields")
|
||||
ctx.run("inv l10n-sync")
|
||||
ctx.run("inv l10n-update")
|
||||
print("Creating fake data")
|
||||
|
@ -99,6 +99,7 @@ def setup(ctx):
|
|||
ctx.run("pipenv run python network-api/manage.py createsuperuser", pty=True)
|
||||
print("All done! To start your dev server, run the following:\n inv runserver")
|
||||
|
||||
|
||||
@task
|
||||
def catch_up(ctx):
|
||||
"""Install dependencies and apply migrations"""
|
||||
|
@ -108,7 +109,7 @@ def catch_up(ctx):
|
|||
ctx.run("pipenv install --dev")
|
||||
print("Applying database migrations.")
|
||||
ctx.run("inv migrate")
|
||||
print("Updating localizable fields");
|
||||
print("Updating localizable fields")
|
||||
ctx.run("inv l10n-sync")
|
||||
ctx.run("inv l10n-update")
|
||||
print("Updating block information")
|
||||
|
|
Загрузка…
Ссылка в новой задаче