diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 791001e40..2d18757b5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -52,7 +52,20 @@ jobs: uses: actions/setup-python@v2.1.4 with: python-version: ${{ matrix.pyv }} + - name: get pip cache dir + id: pip-cache-dir + run: | + echo "::set-output name=dir::$(pip cache dir)" + - name: set pip cache + id: pip-cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache-dir.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- - name: install + if: steps.cache.pip-cache-dir.cache-hit != 'true' run: | pip install wheel pip install -e ".[all,tests]"