Skip to content

Commit

Permalink
Updated gitlab-ci cache settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jpflouret committed Mar 27, 2024
1 parent 108d0af commit 093ddc1
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ image: python:latest
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

cache:
paths:
- .cache/pip
- venv/
default:
cache: &global_cache
key: $CI_COMMIT_REF_SLUG
policy: pull-push
paths:
- .cache/pip
- venv/

before_script:
- python -V
Expand All @@ -30,6 +33,9 @@ build:
- dist/*.whl

test:
cache:
<<: *global_cache
policy: pull
stage: test
needs: []
script:
Expand All @@ -39,11 +45,13 @@ test:
- black --diff --check iqtrade tests examples

publish:
cache:
<<: *global_cache
policy: pull
stage: publish
only:
- tags
needs: ["build"]
script:
- pip install twine
- python -m twine upload dist/*
when: manual

0 comments on commit 093ddc1

Please # to comment.