From 58c087f7f579bb39d1f77ae9612c6ce68358a4bc Mon Sep 17 00:00:00 2001 From: Anas Date: Tue, 22 Dec 2020 22:37:41 +0200 Subject: [PATCH] Added cache in github actions to speed up CI (#549) --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4054c04..fb6d29b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-lint-${{ hashFiles('./dev-requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip-${{ matrix.python-version }}-lint- - name: Install dependencies run: | pip install -U pip setuptools wheel @@ -36,6 +42,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-test-${{ hashFiles('./dev-requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip-${{ matrix.python-version }}-test- - name: Install dependencies run: | pip install -U pip setuptools wheel @@ -58,6 +70,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.django-version }}-typecheck-${{ hashFiles('./dev-requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.django-version }}-typecheck- - name: Install dependencies run: | pip install -U pip setuptools wheel