Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up caching PyPI deps in GHA #1378

Merged
merged 2 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,30 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Log python version info (${{ matrix.python-version }})
run: python --version --version
- name: Pip cache
uses: actions/cache@v2
with:
path: >-
${{
runner.os == 'Linux' &&
'~/.cache/pip'
|| ''
}}${{
runner.os == 'macOS' &&
'~/Library/Caches/pip'
|| ''
}}${{
runner.os == 'Windows' &&
'~\AppData\Local\pip\Cache'
|| ''
}}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install test dependencies
run: python -m pip install -U tox virtualenv
- name: Prepare test environment
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,30 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: >-
${{
runner.os == 'Linux' &&
'~/.cache/pip'
|| ''
}}${{
runner.os == 'macOS' &&
'~/Library/Caches/pip'
|| ''
}}${{
runner.os == 'Windows' &&
'~\AppData\Local\pip\Cache'
|| ''
}}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install test dependencies
run: python -m pip install -U tox virtualenv
- name: Prepare test environment
Expand Down Expand Up @@ -65,6 +89,30 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: >-
${{
runner.os == 'Linux' &&
'~/.cache/pip'
|| ''
}}${{
runner.os == 'macOS' &&
'~/Library/Caches/pip'
|| ''
}}${{
runner.os == 'Windows' &&
'~\AppData\Local\pip\Cache'
|| ''
}}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install tox
run: pip install tox
- name: Prepare test environment
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,30 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: >-
${{
runner.os == 'Linux' &&
'~/.cache/pip'
|| ''
}}${{
runner.os == 'macOS' &&
'~/Library/Caches/pip'
|| ''
}}${{
runner.os == 'Windows' &&
'~\AppData\Local\pip\Cache'
|| ''
}}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Prepare cache key
id: cache-key
run: echo "::set-output name=sha-256::$(python -VV | sha256sum | cut -d' ' -f1)"
Expand Down