Skip to content

Commit 7cafd93

Browse files
trasklmolkova
andauthored
Use uv for CI tool bootstrap (#42)
* Use uv for CI tool bootstrap * sync --------- Co-authored-by: Liudmila Molkova <neskazu@gmail.com>
1 parent 7018efc commit 7cafd93

9 files changed

Lines changed: 252 additions & 258 deletions

File tree

.github/workflows/changelog.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') }}
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424
with:
2525
fetch-depth: 0
2626

@@ -77,12 +77,12 @@ jobs:
7777
echo "$fragments"
7878
7979
- name: Set up Python
80-
uses: actions/setup-python@v5
80+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
8181
with:
8282
python-version: "3.14"
8383

84-
- name: Install towncrier
85-
run: pip install towncrier==25.8.0
84+
- name: Set up uv
85+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
8686

8787
- name: Preview changelogs
8888
run: |
@@ -91,5 +91,5 @@ jobs:
9191
[ -f "$pkg/pyproject.toml" ] || continue
9292
grep -q "tool.towncrier" "$pkg/pyproject.toml" || continue
9393
echo "=== $pkg ==="
94-
(cd "$pkg" && towncrier build --draft --version Unreleased)
94+
(cd "$pkg" && uvx --from towncrier==25.8.0 towncrier build --draft --version Unreleased)
9595
done

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ jobs:
3838
with:
3939
python-version: "3.14"
4040

41-
- name: Install tox
42-
run: pip install tox-uv
41+
- name: Set up uv
42+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4343

4444
- name: Run tests
45-
run: tox -e {{ job_data.tox_env }}
45+
run: uvx --with tox-uv tox -e {{ job_data.tox_env }}
4646
{%- endfor %}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
with:
6666
python-version: "3.11"
6767

68-
- name: Install tox
69-
run: pip install tox-uv
68+
- name: Set up uv
69+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
7070

7171
{%- if job_data == "docker-tests" %}
7272

@@ -75,7 +75,7 @@ jobs:
7575
{%- endif %}
7676

7777
- name: Run tests
78-
run: tox -e {{ job_data }}
78+
run: uvx --with tox-uv tox -e {{ job_data }}
7979
{%- if job_data == "generate-workflows" %}
8080

8181
- name: Check workflows are up to date

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
with:
3939
python-version: "{{ job_data.python_version }}"
4040

41-
- name: Install tox
42-
run: pip install tox-uv
41+
- name: Set up uv
42+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4343
{%- if job_data.os == "windows-latest" %}
4444

4545
- name: Configure git to support long filenames
@@ -88,5 +88,5 @@ jobs:
8888
{%- endif %}
8989

9090
- name: Run tests
91-
run: tox -e {{ job_data.tox_env }} -- -ra
91+
run: uvx --with tox-uv tox -e {{ job_data.tox_env }} -- -ra
9292
{%- endfor %}

.github/workflows/lint.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
with:
3838
python-version: "3.14"
3939

40-
- name: Install tox
41-
run: pip install tox-uv
40+
- name: Set up uv
41+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4242

4343
- name: Run tests
44-
run: tox -e lint-instrumentation-openai-v2
44+
run: uvx --with tox-uv tox -e lint-instrumentation-openai-v2
4545

4646
lint-instrumentation-openai_agents-v2:
4747
name: instrumentation-openai_agents-v2
@@ -56,11 +56,11 @@ jobs:
5656
with:
5757
python-version: "3.14"
5858

59-
- name: Install tox
60-
run: pip install tox-uv
59+
- name: Set up uv
60+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
6161

6262
- name: Run tests
63-
run: tox -e lint-instrumentation-openai_agents-v2
63+
run: uvx --with tox-uv tox -e lint-instrumentation-openai_agents-v2
6464

6565
lint-instrumentation-google-genai:
6666
name: instrumentation-google-genai
@@ -75,11 +75,11 @@ jobs:
7575
with:
7676
python-version: "3.14"
7777

78-
- name: Install tox
79-
run: pip install tox-uv
78+
- name: Set up uv
79+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
8080

8181
- name: Run tests
82-
run: tox -e lint-instrumentation-google-genai
82+
run: uvx --with tox-uv tox -e lint-instrumentation-google-genai
8383

8484
lint-instrumentation-anthropic:
8585
name: instrumentation-anthropic
@@ -94,11 +94,11 @@ jobs:
9494
with:
9595
python-version: "3.14"
9696

97-
- name: Install tox
98-
run: pip install tox-uv
97+
- name: Set up uv
98+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
9999

100100
- name: Run tests
101-
run: tox -e lint-instrumentation-anthropic
101+
run: uvx --with tox-uv tox -e lint-instrumentation-anthropic
102102

103103
lint-instrumentation-claude-agent-sdk:
104104
name: instrumentation-claude-agent-sdk
@@ -113,11 +113,11 @@ jobs:
113113
with:
114114
python-version: "3.14"
115115

116-
- name: Install tox
117-
run: pip install tox-uv
116+
- name: Set up uv
117+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
118118

119119
- name: Run tests
120-
run: tox -e lint-instrumentation-claude-agent-sdk
120+
run: uvx --with tox-uv tox -e lint-instrumentation-claude-agent-sdk
121121

122122
lint-instrumentation-langchain:
123123
name: instrumentation-langchain
@@ -132,11 +132,11 @@ jobs:
132132
with:
133133
python-version: "3.14"
134134

135-
- name: Install tox
136-
run: pip install tox-uv
135+
- name: Set up uv
136+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
137137

138138
- name: Run tests
139-
run: tox -e lint-instrumentation-langchain
139+
run: uvx --with tox-uv tox -e lint-instrumentation-langchain
140140

141141
lint-instrumentation-weaviate:
142142
name: instrumentation-weaviate
@@ -151,11 +151,11 @@ jobs:
151151
with:
152152
python-version: "3.14"
153153

154-
- name: Install tox
155-
run: pip install tox-uv
154+
- name: Set up uv
155+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
156156

157157
- name: Run tests
158-
run: tox -e lint-instrumentation-weaviate
158+
run: uvx --with tox-uv tox -e lint-instrumentation-weaviate
159159

160160
lint-util-genai:
161161
name: util-genai
@@ -170,11 +170,11 @@ jobs:
170170
with:
171171
python-version: "3.14"
172172

173-
- name: Install tox
174-
run: pip install tox-uv
173+
- name: Set up uv
174+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
175175

176176
- name: Run tests
177-
run: tox -e lint-util-genai
177+
run: uvx --with tox-uv tox -e lint-util-genai
178178

179179
lint-license-header-check:
180180
name: license-header-check
@@ -189,8 +189,8 @@ jobs:
189189
with:
190190
python-version: "3.14"
191191

192-
- name: Install tox
193-
run: pip install tox-uv
192+
- name: Set up uv
193+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
194194

195195
- name: Run tests
196-
run: tox -e lint-license-header-check
196+
run: uvx --with tox-uv tox -e lint-license-header-check

.github/workflows/misc.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
with:
3838
python-version: "3.11"
3939

40-
- name: Install tox
41-
run: pip install tox-uv
40+
- name: Set up uv
41+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4242

4343
- name: Run tests
44-
run: tox -e spellcheck
44+
run: uvx --with tox-uv tox -e spellcheck
4545

4646
docs:
4747
name: docs
@@ -58,11 +58,11 @@ jobs:
5858
with:
5959
python-version: "3.11"
6060

61-
- name: Install tox
62-
run: pip install tox-uv
61+
- name: Set up uv
62+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
6363

6464
- name: Run tests
65-
run: tox -e docs
65+
run: uvx --with tox-uv tox -e docs
6666

6767
generate:
6868
name: generate
@@ -77,11 +77,11 @@ jobs:
7777
with:
7878
python-version: "3.11"
7979

80-
- name: Install tox
81-
run: pip install tox-uv
80+
- name: Set up uv
81+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
8282

8383
- name: Run tests
84-
run: tox -e generate
84+
run: uvx --with tox-uv tox -e generate
8585

8686
- name: Check workflows are up to date
8787
run: git diff --exit-code || (echo 'Generated code is out of date, run "tox -e generate" and commit the changes in this PR.' && exit 1)
@@ -102,11 +102,11 @@ jobs:
102102
with:
103103
python-version: "3.11"
104104

105-
- name: Install tox
106-
run: pip install tox-uv
105+
- name: Set up uv
106+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
107107

108108
- name: Run tests
109-
run: tox -e generate-workflows
109+
run: uvx --with tox-uv tox -e generate-workflows
110110

111111
- name: Check workflows are up to date
112112
run: git diff --exit-code || (echo 'Generated workflows are out of date, run "tox -e generate-workflows" and commit the changes in this PR.' && exit 1)
@@ -124,11 +124,11 @@ jobs:
124124
with:
125125
python-version: "3.11"
126126

127-
- name: Install tox
128-
run: pip install tox-uv
127+
- name: Set up uv
128+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
129129

130130
- name: Run tests
131-
run: tox -e shellcheck
131+
run: uvx --with tox-uv tox -e shellcheck
132132

133133
precommit:
134134
name: precommit
@@ -143,11 +143,11 @@ jobs:
143143
with:
144144
python-version: "3.11"
145145

146-
- name: Install tox
147-
run: pip install tox-uv
146+
- name: Set up uv
147+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
148148

149149
- name: Run tests
150-
run: tox -e precommit
150+
run: uvx --with tox-uv tox -e precommit
151151

152152
typecheck:
153153
name: typecheck
@@ -162,8 +162,8 @@ jobs:
162162
with:
163163
python-version: "3.11"
164164

165-
- name: Install tox
166-
run: pip install tox-uv
165+
- name: Set up uv
166+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
167167

168168
- name: Run tests
169-
run: tox -e typecheck
169+
run: uvx --with tox-uv tox -e typecheck

0 commit comments

Comments
 (0)