Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0eaa93b

Browse files
committedMar 12, 2025·
Fix transient CI errors with tox/git retry
CI is intermittently failing when building tox environments. Mitigate this by including a tox build step with retries before executing tox commands.
1 parent 6daf581 commit 0eaa93b

File tree

6 files changed

+1391
-256
lines changed

6 files changed

+1391
-256
lines changed
 

‎.github/workflows/core_contrib_test_0.yml

+846-188
Large diffs are not rendered by default.

‎.github/workflows/generate_workflows_lib/src/generate_workflows_lib/core_contrib_test.yml.j2

+8-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ jobs:
3939
- name: Install tox
4040
run: pip install tox-uv
4141

42+
- name: Setup tox with retry
43+
uses: nick-fields/retry@v2
44+
with:
45+
timeout_minutes: 2
46+
max_attempts: 3
47+
command: tox -e {{ job_data.tox_env }} --pkg-only
48+
4249
- name: Run tests
43-
run: tox -e {{ job_data.tox_env }} -- -ra
50+
run: tox -e {{ job_data.tox_env }} --skip-pkg-install -- -ra
4451
{%- endfor %}

‎.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2

+8-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ jobs:
3232
- name: Install tox
3333
run: pip install tox-uv
3434

35+
- name: Setup tox with retry
36+
uses: nick-fields/retry@v2
37+
with:
38+
timeout_minutes: 10
39+
max_attempts: 3
40+
command: tox -e {{ job_data.tox_env }} --pkg-only
41+
3542
- name: Run tests
36-
run: tox -e {{ job_data.tox_env }}
43+
run: tox -e {{ job_data.tox_env }} --skip-pkg-install
3744
{%- endfor %}

‎.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2

+8-1
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ jobs:
5959
- name: Install tox
6060
run: pip install tox-uv
6161

62+
- name: Setup tox with retry
63+
uses: nick-fields/retry@v2
64+
with:
65+
timeout_minutes: 10
66+
max_attempts: 3
67+
command: tox -e {{ job_data.tox_env }} --pkg-only
68+
6269
- name: Run tests
63-
run: tox -e {{ job_data }}
70+
run: tox -e {{ job_data }} --skip-pkg-install
6471
{%- if job_data == "generate-workflows" %}
6572

6673
- name: Check workflows are up to date

‎.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2

+9-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,20 @@ jobs:
3131

3232
- name: Install tox
3333
run: pip install tox-uv
34+
35+
- name: Setup tox with retry
36+
uses: nick-fields/retry@v2
37+
with:
38+
timeout_minutes: 2
39+
max_attempts: 3
40+
command: tox -e {{ job_data.tox_env }} --pkg-only
41+
3442
{%- if job_data.os == "windows-latest" %}
3543

3644
- name: Configure git to support long filenames
3745
run: git config --system core.longpaths true
3846
{%- endif %}
3947

4048
- name: Run tests
41-
run: tox -e {{ job_data.tox_env }} -- -ra
49+
run: tox -e {{ job_data.tox_env }} --skip-pkg-install -- -ra
4250
{%- endfor %}

‎.github/workflows/lint_0.yml

+512-64
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.