Skip to content

Commit 96925ae

Browse files
authored
Merge pull request #423 from light-curve/ci-rust-cache
Share ./target between tox envs
2 parents b7db201 + 3e9742b commit 96925ae

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
uses: actions/setup-python@v5
4848
with:
4949
python-version: "3.${{ matrix.python_minor }}"
50+
- uses: Swatinem/rust-cache@v2
51+
with:
52+
shared-key: "${{ runner.os }}_stable-rust_tox-py3${{ matrix.python_minor }}"
53+
workspaces: "light-curve"
5054
- name: Install tox
5155
run: pip install tox
5256
- name: Run Python tests

light-curve/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,16 @@ change_dir = {envtmpdir}
167167
extras =
168168
commands =
169169
python -c 'import light_curve'
170+
set_env =
171+
CARGO_TARGET_DIR = {tox_root}/target
170172
171173
[testenv:py{38,39,310,311,312}-test]
172174
extras = dev
173175
commands =
174176
pytest README.md tests/ light_curve/
175177
ruff check .
178+
set_env =
179+
CARGO_TARGET_DIR = {tox_root}/target
176180
"""
177181

178182

0 commit comments

Comments
 (0)