Skip to content

Commit

Permalink
Add support for Python package caching
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Jan 2, 2023
1 parent 1aebd54 commit 9273b2f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,8 @@ jobs:
cache-path: |
a/
cache-key: cache-${{ github.run_id }}
test_no_python_cache:
uses: ./.github/workflows/tox.yml
with:
python-cache: ''
6 changes: 6 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ on:
required: false
default: true
type: boolean
python-cache:
description: Package manager to cache. Passed to actions/setup-python. Set to an emtpy string for no caching.
required: false
default: 'pip'
type: string
secrets:
CODECOV_TOKEN:
description: Codecov upload token (for private repositories only)
Expand Down Expand Up @@ -157,6 +162,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
cache: ${{ matrix.python-cache }}

- name: Setup conda
if: ${{ matrix.conda == 'true' }}
Expand Down

0 comments on commit 9273b2f

Please sign in to comment.