From 9d9a3f2865a9c5c4411863e83d82b90dc5297484 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 25 Mar 2023 20:32:44 +0100 Subject: [PATCH] Compile messages before tests --- .github/workflows/test.yaml | 2 +- tasks.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9a72b32..ca99464 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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/ diff --git a/tasks.py b/tasks.py index c14d58a..e9d3c2b 100644 --- a/tasks.py +++ b/tasks.py @@ -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(