Skip to content

Commit

Permalink
Cache Python Packages in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
waynehamadi committed May 31, 2023
1 parent 9e9b128 commit 55f0bf7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ jobs:
with:
python-version: ${{ env.min-python-version }}

- name: Set Date
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
shell: bash

- name: Cache Python packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ env.DATE }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -112,6 +122,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Set Date
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
shell: bash

- name: Cache Python packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ env.DATE }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down

0 comments on commit 55f0bf7

Please sign in to comment.