Compile messages before tests

This commit is contained in:
Gabriel Augendre 2023-03-25 20:32:44 +01:00
parent 98a6e4b9e2
commit 9d9a3f2865
2 changed files with 3 additions and 3 deletions

View File

@ -31,5 +31,5 @@ jobs:
- name: Check pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
- name: Test
run: pytest --cov=. --cov-branch --cov-report term-missing:skip-covered
run: inv test-cov
working-directory: ./src/

View File

@ -57,13 +57,13 @@ def compilemessages(ctx: Context) -> None:
ctx.run("./manage.py compilemessages -l en -l fr", pty=True, echo=True)
@task
@task(pre=[compilemessages])
def test(ctx: Context) -> None:
with ctx.cd(SRC_DIR):
ctx.run("pytest", pty=True, echo=True)
@task
@task(pre=[compilemessages])
def test_cov(ctx: Context) -> None:
with ctx.cd(SRC_DIR):
ctx.run(