Skip to content

Commit 8154454

Browse files
Copilotnotatallshaw
andcommitted
Update CI to use ubuntu-latest and fix linting issues
- Change all ubuntu-22.04 instances to ubuntu-latest in CI workflow - Fix whitespace and line length issues in tests/lib/venv.py - Addresses feedback to modernize CI to latest Ubuntu versions Co-authored-by: notatallshaw <8070352+notatallshaw@users.noreply.github.com>
1 parent e1656cc commit 8154454

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ concurrency:
2525
jobs:
2626
docs:
2727
name: docs
28-
runs-on: ubuntu-22.04
28+
runs-on: ubuntu-latest
2929

3030
steps:
3131
- uses: actions/checkout@v5
@@ -36,7 +36,7 @@ jobs:
3636
- run: nox -s docs
3737

3838
determine-changes:
39-
runs-on: ubuntu-22.04
39+
runs-on: ubuntu-latest
4040
outputs:
4141
tests: ${{ steps.filter.outputs.tests }}
4242
vendoring: ${{ steps.filter.outputs.vendoring }}
@@ -67,7 +67,7 @@ jobs:
6767
runs-on: ${{ matrix.os }}
6868
strategy:
6969
matrix:
70-
os: [ubuntu-22.04, windows-latest]
70+
os: [ubuntu-latest, windows-latest]
7171

7272
steps:
7373
- uses: actions/checkout@v5
@@ -86,7 +86,7 @@ jobs:
8686

8787
vendoring:
8888
name: vendoring
89-
runs-on: ubuntu-22.04
89+
runs-on: ubuntu-latest
9090

9191
needs: [determine-changes]
9292
if: >-
@@ -115,7 +115,7 @@ jobs:
115115
strategy:
116116
fail-fast: true
117117
matrix:
118-
os: [ubuntu-22.04, macos-latest]
118+
os: [ubuntu-latest, macos-latest]
119119
python:
120120
- "3.9"
121121
- "3.10"
@@ -261,7 +261,7 @@ jobs:
261261
- tests-zipapp
262262
- vendoring
263263

264-
runs-on: ubuntu-22.04
264+
runs-on: ubuntu-latest
265265

266266
steps:
267267
- name: Decide whether the needed jobs succeeded or failed

tests/lib/venv.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,23 @@ def _customize_site(self) -> None:
194194
if self._sitecustomize is not None:
195195
contents += "\n" + self._sitecustomize
196196
sitecustomize = self.site / "sitecustomize.py"
197-
197+
198198
# Ensure the site directory exists before writing files
199199
sitecustomize.parent.mkdir(parents=True, exist_ok=True)
200-
200+
201201
sitecustomize.write_text(contents)
202-
203-
# Ubuntu 24.04 compatibility: Also create a .pth file that imports our customizations
204-
# This ensures our customizations run even if system sitecustomize is loaded first
202+
203+
# Ubuntu 24.04 compatibility: Also create a .pth file that imports our
204+
# customizations. This ensures they run even if system sitecustomize loads first
205205
if self._sitecustomize is not None:
206206
# Create a separate module for our customizations
207207
customizations_module = self.site / "_venv_customizations.py"
208208
customizations_module.write_text(self._sitecustomize)
209-
209+
210210
# Create a .pth file that imports this module
211211
pth_file = self.site / "venv_customizations.pth"
212212
pth_file.write_text("import _venv_customizations")
213-
213+
214214
# Make sure bytecode is up-to-date too.
215215
assert compileall.compile_file(str(sitecustomize), quiet=1, force=True)
216216

0 commit comments

Comments
 (0)