summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-04-21 18:03:07 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-04-21 18:03:07 +0100
commita73fb963896019bbe6216c877d3ec03e797dd056 (patch)
tree17f6e93b8235ba1678b9fb7e0400b78a1413144d /.github/workflows
parent372652d6dadf8de6c29c83d0f2107fdd7b6e6571 (diff)
downloadpython-setuptools-git-a73fb963896019bbe6216c877d3ec03e797dd056.tar.gz
Cache downloaded files used during tests for setuptools.config
Recently Github Actions started to fail with `HTTP Error 429: Too Many Requests`. A solution for this problem is to add some caching.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c680fb36..e2197aad 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -39,6 +39,20 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
+ - uses: actions/cache@v3
+ id: cache
+ with:
+ path: setuptools/tests/config/downloads/*.cfg
+ key: ${{
+ hashFiles(
+ 'setuptools/tests/config/setupcfg_examples.txt',
+ 'setuptools/tests/config/downloads/*.py'
+ )
+ }}
+ - name: Populate download cache
+ if: steps.cache.outputs.cache-hit != 'true'
+ working-directory: setuptools/tests/config
+ run: python -m downloads.preload setupcfg_examples.txt
- name: Install tox
run: |
python -m pip install tox