From 0b5ae277b52d158180ba782fd3863f91d16026aa Mon Sep 17 00:00:00 2001 From: Henrik Widlund <4659350+henrikwidlund@users.noreply.github.com> Date: Tue, 28 Jul 2026 19:56:24 +0200 Subject: [PATCH] feat: Include requirements files in cache - Always use cache in setup-python - Include dependency files in cache - Specify versions in test-requirements.txt to avoid stale caches --- .github/workflows/build.yml | 3 +++ .github/workflows/python-code-format.yml | 4 ++++ .github/workflows/python-publish-pypi.yml | 8 ++++++++ test-requirements.txt | 8 ++++---- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dace415..204d83f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,9 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: "pip" + cache-dependency-path: | + requirements.txt + test-requirements.txt - name: Install pip run: | diff --git a/.github/workflows/python-code-format.yml b/.github/workflows/python-code-format.yml index d6bd931..e7a9ab0 100644 --- a/.github/workflows/python-code-format.yml +++ b/.github/workflows/python-code-format.yml @@ -33,6 +33,10 @@ jobs: uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} + cache: "pip" + cache-dependency-path: | + requirements.txt + test-requirements.txt - name: Install dependencies run: | diff --git a/.github/workflows/python-publish-pypi.yml b/.github/workflows/python-publish-pypi.yml index 7dca3e4..1ca838f 100644 --- a/.github/workflows/python-publish-pypi.yml +++ b/.github/workflows/python-publish-pypi.yml @@ -18,6 +18,10 @@ jobs: uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.11" + cache: "pip" + cache-dependency-path: | + requirements.txt + test-requirements.txt - name: Install dependencies run: | python -m pip install --upgrade pip @@ -47,6 +51,10 @@ jobs: uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.11" + cache: "pip" + cache-dependency-path: | + requirements.txt + test-requirements.txt - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/test-requirements.txt b/test-requirements.txt index 8024f9c..24a12da 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,7 @@ # pin pylint version: it has a tendendy for stricter rules in patch updates! pylint==4.0.5 -flake8-docstrings -flake8 -black -isort +flake8-docstrings==1.7.0 +flake8==7.3.0 +black==26.5.1 +isort==8.0.1