Skip to content

Commit ec26547

Browse files
authored
Merge pull request #53 from ikalnytskyi/ihor/drop-retired-runners
Remove retired runners from CI
2 parents 10ab8a5 + e8edc06 commit ec26547

File tree

3 files changed

+9
-34
lines changed

3 files changed

+9
-34
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ jobs:
1818
strategy:
1919
matrix:
2020
os:
21-
- ubuntu-20.04
2221
- ubuntu-22.04
2322
- ubuntu-24.04
2423
- macos-13
2524
- macos-14
2625
- macos-15
27-
- windows-2019
2826
- windows-2022
27+
- windows-2025
2928
steps:
3029
- uses: actions/checkout@v4
3130

@@ -56,14 +55,13 @@ jobs:
5655
strategy:
5756
matrix:
5857
os:
59-
- ubuntu-20.04
6058
- ubuntu-22.04
6159
- ubuntu-24.04
6260
- macos-13
6361
- macos-14
6462
- macos-15
65-
- windows-2019
6663
- windows-2022
64+
- windows-2025
6765
postgres-version:
6866
- "14"
6967
- "15"

action.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,6 @@ runs:
111111
DEFAULT_ENCODING="UTF-8"
112112
DEFAULT_LOCALE="en_US.$DEFAULT_ENCODING"
113113
114-
# Unfortunately, Windows Server 2019 doesn't understand locale
115-
# specified in the format defined by the POSIX standard, i.e.
116-
# <language>_<country>.<encoding>. Therefore, we have to convert it
117-
# into something it can swallow, i.e. <language>-<country>.
118-
if [[ "$RUNNER_OS" == "Windows" && "$(wmic os get Caption)" == *"2019"* ]]; then
119-
DEFAULT_LOCALE="${DEFAULT_LOCALE%%.*}"
120-
DEFAULT_LOCALE="${DEFAULT_LOCALE//_/-}"
121-
fi
122-
123114
# Unfortunately 'initdb' could only receive a password via file on disk
124115
# or prompt to enter on. Prompting is not an option since we're running
125116
# in non-interactive mode.

tests/test_action.py

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@ def is_windows() -> bool:
2020
return os.name == "nt"
2121

2222

23-
@pytest.fixture(scope="function")
24-
def is_windows_server_2019(is_windows: bool) -> bool:
25-
"""Returns True if running on Windows Server 2019."""
26-
27-
if not is_windows:
28-
return False
29-
30-
windows_caption = subprocess.check_output(["wmic", "os", "get", "Caption"], text=True)
31-
return "Windows Server 2019" in windows_caption
32-
33-
3423
@pytest.fixture(scope="function")
3524
def connection_uri() -> str:
3625
"""Read and return connection URI from environment."""
@@ -108,27 +97,24 @@ def test_server_encoding(connection: psycopg.Connection):
10897
assert connection.execute("SHOW SERVER_ENCODING").fetchone()[0] == "UTF8"
10998

11099

111-
def test_locale(connection: psycopg.Connection, is_windows_server_2019: bool):
112-
"""Test that PostgreSQL's locale matches the one we paased to initdb."""
113-
114-
locale_exp = "en_US.UTF-8"
100+
def test_locale(connection: psycopg.Connection):
101+
"""Test that PostgreSQL's locale matches the one we passed to initdb."""
115102

116-
if is_windows_server_2019:
117-
locale_exp = "en-US"
103+
locale_expected = "en_US.UTF-8"
118104

119105
record = connection \
120106
.execute("SELECT datcollate, datctype FROM pg_database WHERE datname = 'template0'") \
121107
.fetchone()
122108
assert record
123-
assert locale.normalize(record[0]) == locale_exp
124-
assert locale.normalize(record[1]) == locale_exp
109+
assert locale.normalize(record[0]) == locale_expected
110+
assert locale.normalize(record[1]) == locale_expected
125111

126112
record = connection \
127113
.execute("SELECT datcollate, datctype FROM pg_database WHERE datname = 'template1'") \
128114
.fetchone()
129115
assert record
130-
assert locale.normalize(record[0]) == locale_exp
131-
assert locale.normalize(record[1]) == locale_exp
116+
assert locale.normalize(record[0]) == locale_expected
117+
assert locale.normalize(record[1]) == locale_expected
132118

133119

134120
def test_environment_variables(is_windows: bool):

0 commit comments

Comments
 (0)