Cache pip dependencies

This commit is contained in:
Odd Stråbø 2020-09-26 04:49:11 +02:00
commit 7f4f20c705

View file

@ -4,7 +4,7 @@ on: [pull_request]
jobs: jobs:
build: build:
name: Running sanity tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@ -18,9 +18,22 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Get pip cache dir
id: pip-cache
run: | run: |
python -m pip install --upgrade pip 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 pip install -r requirements-dev.txt
- name: Lint with flake8 - name: Lint with flake8