From 2b3626153b8e8091719d90e92b85909d05a58bf2 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:29:03 +0200 Subject: [PATCH] fix: run tests with code coverage only if enabled --- {{cookiecutter.project_name}}/.github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/{{cookiecutter.project_name}}/.github/workflows/main.yml b/{{cookiecutter.project_name}}/.github/workflows/main.yml index cfcb02c..b07a7c7 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/main.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/main.yml @@ -44,7 +44,11 @@ jobs: python-version: {% raw %}${{ matrix.python-version }}{% endraw %} - name: Run tests +{%- if cookiecutter.codecov == "y" %} run: poetry run pytest tests --cov --cov-config=pyproject.toml --cov-report=xml +{%- else %} + run: poetry run pytest tests +{%- endif %} - name: Check typing run: poetry run {{ cookiecutter.typechecking }}