Skip to content

Commit 52fb056

Browse files
committed
Fix CI for Windows support and align with main workflow conventions
- tests/test_windows_compatibility.py: mark the docstring with a backslash path example as a raw string so ruff D301 passes on pre-commit.ci. - .github/workflows/tests.yml: drop windows_postgres_18 and windows_postgres_16 jobs. ankane/setup-postgres@v1 only ships PostgreSQL 17 on the Windows runner, so those versions cannot install and the jobs are guaranteed to fail. Keep windows_postgres_17 and add the codecov_token secret so coverage uploads work. - .github/workflows/dockerised-postgres.yml: remove the stale editable: true flag. Per fizyk in #1294, the editable self-install is handled by the pytest-postgresql entry in the Pipfile, and the other workflows on main do not set the flag either. Made-with: Cursor
1 parent 87abf24 commit 52fb056

3 files changed

Lines changed: 5 additions & 18 deletions

File tree

.github/workflows/dockerised-postgres.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ jobs:
5454
with:
5555
python-version: ${{ matrix.python-version }}
5656
allow-prereleases: true
57-
editable: true
5857
- name: Run test noproc fixture on docker
5958
uses: fizyk/actions-reuse/.github/actions/pipenv-run@v4.4.4
6059
with:

.github/workflows/tests.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,27 +77,15 @@ jobs:
7777
python-versions: '["3.13", "3.14"]'
7878
secrets:
7979
codecov_token: ${{ secrets.CODECOV_TOKEN }}
80-
windows_postgres_18:
81-
needs: [postgresql_18]
82-
uses: ./.github/workflows/single-postgres.yml
83-
with:
84-
postgresql: 18
85-
os: windows-latest
86-
python-versions: '["3.12", "3.13", "3.14"]'
8780
windows_postgres_17:
88-
needs: [postgresql_17, windows_postgres_18]
81+
needs: [postgresql_17]
8982
uses: ./.github/workflows/single-postgres.yml
9083
with:
9184
postgresql: 17
9285
os: windows-latest
9386
python-versions: '["3.12", "3.13", "3.14"]'
94-
windows_postgres_16:
95-
needs: [postgresql_16, windows_postgres_17]
96-
uses: ./.github/workflows/single-postgres.yml
97-
with:
98-
postgresql: 16
99-
os: windows-latest
100-
python-versions: '["3.13", "3.14"]'
87+
secrets:
88+
codecov_token: ${{ secrets.CODECOV_TOKEN }}
10189
docker_postgresql_18:
10290
needs: [postgresql_18]
10391
uses: ./.github/workflows/dockerised-postgres.yml

tests/test_windows_compatibility.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,10 @@ class TestRunningMethod:
784784
"""Test that running() uses safe list-form subprocess invocation."""
785785

786786
def test_running_passes_executable_as_argv_element(self) -> None:
787-
"""Test that running() passes the executable as an argv element, not a shell string.
787+
r"""Test that running() passes the executable as an argv element, not a shell string.
788788
789789
Using subprocess.run with a list means paths with spaces (e.g.
790-
C:\\Program Files\\...\\pg_ctl.exe) are passed as a single token to the
790+
C:\Program Files\...\pg_ctl.exe) are passed as a single token to the
791791
OS without any shell parsing, so no quoting is required or desired.
792792
"""
793793
executor = PostgreSQLExecutor(

0 commit comments

Comments
 (0)