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

ci: save pip cache for multi-python jobs #1095

Merged
merged 3 commits into from
Nov 23, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,20 @@ jobs:
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Check for pip cache
id: cache-pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python }}
- name: Cache not found
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
echo "No pip cache for ${{ matrix.python }} found"
- name: Cache found
if: steps.cache-pip.outputs.cache-hit == 'true'
run: |
echo "pip cache for ${{ matrix.python }} found"
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
Expand Down Expand Up @@ -186,6 +200,20 @@ jobs:
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Check for pip cache
id: cache-pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python }}
- name: Cache not found
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
echo "No pip cache for ${{ matrix.python }} found"
- name: Cache found
if: steps.cache-pip.outputs.cache-hit == 'true'
run: |
echo "pip cache for ${{ matrix.python }} found"
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
Expand Down Expand Up @@ -272,6 +300,20 @@ jobs:
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Check for pip cache
id: cache-pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python }}
- name: Cache not found
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
echo "No pip cache for ${{ matrix.python }} found"
- name: Cache found
if: steps.cache-pip.outputs.cache-hit == 'true'
run: |
echo "pip cache for ${{ matrix.python }} found"
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
Expand All @@ -296,6 +338,20 @@ jobs:
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Check for pip cache
id: cache-pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python }}
- name: Cache not found
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
echo "No pip cache for ${{ matrix.python }} found"
- name: Cache found
if: steps.cache-pip.outputs.cache-hit == 'true'
run: |
echo "pip cache for ${{ matrix.python }} found"
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
Expand Down