From 7beedd26d8525911b2d4a30ee4612bdc8137ae97 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 7 Nov 2020 14:24:45 -0800 Subject: [PATCH] add pip cache --- .github/workflows/python-app.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 5f93f797..ed3334fc 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,11 +23,22 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v2 + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: pip cache + uses: actions/cache@v2 with: - path: | - .venv - ~/.cache/pip + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ matrix.python-version }} + + - name: poetry cache + uses: actions/cache@v2 + with: + path: .venv key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }} - name: Install dependencies run: |