diff --git a/.gitlab/workflows/ci.yml b/.gitlab/workflows/ci.yml index 21d0090d..29ac5f6f 100644 --- a/.gitlab/workflows/ci.yml +++ b/.gitlab/workflows/ci.yml @@ -4,6 +4,13 @@ ci: coverage_report: coverage_format: cobertura path: coverage.xml + cache: + paths: + - .venv + key: + files: + - pdm.lock + prefix: venv-${PYTHON_VERSION} coverage: /(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/ image: ${CI_REGISTRY_IMAGE}/dev:py${PYTHON_VERSION} interruptible: true diff --git a/.gitlab/workflows/release.yml b/.gitlab/workflows/release.yml index 736f2dfa..b279803a 100644 --- a/.gitlab/workflows/release.yml +++ b/.gitlab/workflows/release.yml @@ -4,6 +4,14 @@ pages-build: - public - docs/changelog.md - release-notes.md + cache: + paths: + - .venv + key: + files: + - pdm.lock + prefix: venv-${PYTHON_VERSION} + policy: pull rules: - if: $CI_COMMIT_TAG =~ /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-?(a|b|rc)(0|[1-9][0-9]*)?)?$/ script: diff --git a/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/ci.yml.jinja b/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/ci.yml.jinja index 7c8bc5e4..f8e5ef16 100644 --- a/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/ci.yml.jinja +++ b/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/ci.yml.jinja @@ -5,6 +5,13 @@ ci: coverage_report: coverage_format: cobertura path: coverage.xml + cache: + paths: + - .venv + key: + files: + - pdm.lock + prefix: venv-${PYTHON_VERSION} coverage: /(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/ image: ${CI_REGISTRY_IMAGE}/dev:py${PYTHON_VERSION} interruptible: true diff --git a/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/release.yml.jinja b/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/release.yml.jinja index e98392be..eda5da8c 100644 --- a/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/release.yml.jinja +++ b/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/release.yml.jinja @@ -5,6 +5,14 @@ pages-build: - public - docs/changelog.md - release-notes.md + cache: + paths: + - .venv + key: + files: + - pdm.lock + prefix: venv-${PYTHON_VERSION} + policy: pull rules: - if: $CI_COMMIT_TAG =~ /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-?(a|b|rc)(0|[1-9][0-9]*)?)?$/ script: