From c7c709a0a79a27c542761c23f06606ec6d3dc0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 26 Sep 2024 10:31:53 -0700 Subject: [PATCH] github: cache venv when running tests --- .github/workflows/tests.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ce3e13494..b806efad4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -27,6 +27,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.10" + - name: Cache virtual environment + uses: actions/cache@v3 + with: + # We are hashing dev-requirements.txt and test-requirements.txt which + # contain all dependencies needed to run the tests. + key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('dev-requirements.txt') }}-${{ hashFiles('test-requirements.txt') }} + path: .venv - name: Install system packages id: install_system_packages run: |