From 3b0920e6a1da5bf6022e20519cf97c44e40a5eb6 Mon Sep 17 00:00:00 2001 From: Raghav Date: Tue, 24 Aug 2021 00:00:03 +0530 Subject: [PATCH 1/2] caching full python environment than pip dependencies --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6979ca3..8ed1cec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,8 +25,10 @@ jobs: - name: Setup cache uses: actions/cache@v1 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} + path: ${{ env.pythonLocation }} + key: ${{ env.pythonLocation }}-pip-${{ hashFiles('setup.py') }} + restore-keys: | + ${{ env.pythonLocation }}-pip- - name: Set up Python 3.8 uses: actions/setup-python@v1 with: From 0561e66ceb39faf8d7157fc064fc85449e5c58d7 Mon Sep 17 00:00:00 2001 From: Raghav Date: Tue, 24 Aug 2021 00:06:39 +0530 Subject: [PATCH 2/2] Changed the order of steps. Installing python before caching --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ed1cec..2e5d9a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,17 +22,17 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 - name: Setup cache uses: actions/cache@v1 with: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-pip-${{ hashFiles('setup.py') }} restore-keys: | - ${{ env.pythonLocation }}-pip- - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 + ${{ env.pythonLocation }}-pip- - name: Install run: | pip install --upgrade pip