Skip to content

Commit

Permalink
Enable caching of pip dependencies
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 578740011
  • Loading branch information
mkruskal-google committed Nov 2, 2023
1 parent 5415d95 commit 70042e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
with:
python-version: ${{ matrix.version }}
cache: pip
cache-dependency-path: 'python/requirements.txt'

- name: Validate version
run: python3 --version | grep ${{ matrix.version }} || (echo "Invalid Python version - $(python3 --version)" && exit 1)
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/test_upb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
uses: protocolbuffers/protobuf-ci/checkout@v2
with:
ref: ${{ inputs.safe-checkout }}
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
cache: pip
cache-dependency-path: 'python/requirements.txt'
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel@v2
with:
Expand All @@ -92,6 +96,10 @@ jobs:
uses: protocolbuffers/protobuf-ci/checkout@v2
with:
ref: ${{ inputs.safe-checkout }}
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
cache: pip
cache-dependency-path: 'python/requirements.txt'
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel@v2
with:
Expand Down Expand Up @@ -195,7 +203,7 @@ jobs:
with:
name: requirements
path: requirements
- uses: actions/setup-python@v2
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
Expand Down Expand Up @@ -250,7 +258,7 @@ jobs:
path: wheels
- name: Delete Binary Wheels
run: find wheels -type f | grep -v none-any | xargs rm
- uses: actions/setup-python@v2
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: ${{ matrix.python-version }}
- name: Setup Python venv
Expand Down

0 comments on commit 70042e2

Please sign in to comment.