Skip to content
Snippets Groups Projects

Cache locally install pip packages, which should speed up pipeline runs in the long term

Merged Karel van Klink requested to merge feature/cache-pip-packages into develop
1 file
+ 2
6
Compare changes
  • Side-by-side
  • Inline
+ 2
6
@@ -17,7 +17,6 @@ run-tox-pipeline:
@@ -17,7 +17,6 @@ run-tox-pipeline:
services:
services:
- postgres:15.4
- postgres:15.4
# Change pip's cache directory to be inside the project directory since we can
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
# only cache local items.
variables:
variables:
@@ -27,14 +26,11 @@ run-tox-pipeline:
@@ -27,14 +26,11 @@ run-tox-pipeline:
DATABASE_URI_TEST: 'postgresql://nwa:nwa@postgres:5432/gso-test-db'
DATABASE_URI_TEST: 'postgresql://nwa:nwa@postgres:5432/gso-test-db'
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/topics/caching/
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
cache:
 
key: tox-virtualenv
paths:
paths:
- .cache/pip
- .cache/pip
 
- venv/
before_script:
before_script:
- pip install virtualenv
- pip install virtualenv
Loading