From a5b7262f65baf403aa87e1703c065ace100b51e6 Mon Sep 17 00:00:00 2001 From: willgraf <7930703+willgraf@users.noreply.github.com> Date: Tue, 20 Jul 2021 17:37:04 -0700 Subject: [PATCH] Cache the entire Python environment to speed up builds. (#66) --- .github/workflows/tests.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 51dbd27..a7a9f0b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -23,16 +23,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Cache pip + - name: Cache Python uses: actions/cache@v2 with: - # This path is specific to Ubuntu - path: ~/.cache/pip - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} + path: ${{ env.pythonLocation }} + key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }} restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- + ${{ env.pythonLocation }}- - name: Install Dependencies run: |