diff --git a/.github/workflows/python-sanity.yaml b/.github/workflows/python-sanity.yaml index 03eb25db..6f796b3d 100644 --- a/.github/workflows/python-sanity.yaml +++ b/.github/workflows/python-sanity.yaml @@ -4,7 +4,7 @@ on: [pull_request] jobs: build: - + name: Running sanity tests runs-on: ubuntu-latest strategy: fail-fast: false @@ -18,9 +18,22 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Get pip cache dir + id: pip-cache run: | python -m pip install --upgrade pip + echo "::set-output name=dir::$(pip cache dir)" + + - name: pip cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }} + restore-keys: | + ${{ runner.os }}-pip-${{ matrix.python-version }}- + + - name: Install dependencies + run: | pip install -r requirements-dev.txt - name: Lint with flake8