diff --git a/{{ cookiecutter.__package_name_kebab_case }}/docker-compose.yml b/{{ cookiecutter.__package_name_kebab_case }}/docker-compose.yml index 9901e056..435f0e00 100644 --- a/{{ cookiecutter.__package_name_kebab_case }}/docker-compose.yml +++ b/{{ cookiecutter.__package_name_kebab_case }}/docker-compose.yml @@ -16,6 +16,9 @@ services: GID: ${GID:-1000} {%- if not cookiecutter.private_package_repository_name %} environment: + {%- if cookiecutter.development_environment == "strict" %} + - CI + {%- endif %} - POETRY_PYPI_TOKEN_PYPI {%- else %} secrets: diff --git a/{{ cookiecutter.__package_name_kebab_case }}/pyproject.toml b/{{ cookiecutter.__package_name_kebab_case }}/pyproject.toml index f7ed8d26..30d1bd04 100644 --- a/{{ cookiecutter.__package_name_kebab_case }}/pyproject.toml +++ b/{{ cookiecutter.__package_name_kebab_case }}/pyproject.toml @@ -274,10 +274,9 @@ convention = "{{ cookiecutter.docstring_style|lower }}" help = "Lint this package" [[tool.poe.tasks.lint.sequence]] - cmd = """ - pre-commit run - --all-files - --color always + shell = """ + {%- if cookiecutter.development_environment == "strict" %}[ -n "$CI" ] && export SKIP=no-commit-to-branch{%- endif %} + pre-commit run --all-files --color always """ {%- if cookiecutter.development_environment == "strict" %}