Skip to content

Commit 5601728

Browse files
authored
CI: Merge database workflow into posix workflow (#45060)
1 parent 4357642 commit 5601728

File tree

4 files changed

+43
-126
lines changed

4 files changed

+43
-126
lines changed

.github/workflows/database.yml

Lines changed: 0 additions & 123 deletions
This file was deleted.

.github/workflows/posix.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
strategy:
2626
matrix:
2727
settings: [
28+
[actions-38-db-min.yaml, "((not slow and not network and not clipboard) or (single and db))", "", "", "", "", ""],
29+
[actions-38-db.yaml, "((not slow and not network and not clipboard) or (single and db))", "", "", "", "", ""],
2830
[actions-38-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
2931
[actions-38-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
3032
[actions-38.yaml, "not slow and not clipboard", "", "", "", "", ""],
@@ -52,7 +54,35 @@ jobs:
5254
# https://github.community/t/concurrecy-not-work-for-push/183068/7
5355
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.settings[0] }}
5456
cancel-in-progress: true
57+
5558
services:
59+
mysql:
60+
image: mysql
61+
env:
62+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
63+
MYSQL_DATABASE: pandas
64+
options: >-
65+
--health-cmd "mysqladmin ping"
66+
--health-interval 10s
67+
--health-timeout 5s
68+
--health-retries 5
69+
ports:
70+
- 3306:3306
71+
72+
postgres:
73+
image: postgres
74+
env:
75+
POSTGRES_USER: postgres
76+
POSTGRES_PASSWORD: postgres
77+
POSTGRES_DB: pandas
78+
options: >-
79+
--health-cmd pg_isready
80+
--health-interval 10s
81+
--health-timeout 5s
82+
--health-retries 5
83+
ports:
84+
- 5432:5432
85+
5686
moto:
5787
image: motoserver/moto
5888
env:

pandas/tests/arrays/floating/test_construction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from pandas.compat import (
77
is_platform_windows,
8-
np_version_under1p19,
8+
np_version_under1p20,
99
)
1010

1111
import pandas as pd
@@ -56,7 +56,7 @@ def test_floating_array_disallows_float16(request):
5656
with pytest.raises(TypeError, match=msg):
5757
FloatingArray(arr, mask)
5858

59-
if np_version_under1p19 or (
59+
if np_version_under1p20 or (
6060
locale.getlocale()[0] != "en_US" and not is_platform_windows()
6161
):
6262
# the locale condition may need to be refined; this fails on

pandas/tests/tools/test_to_datetime.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from pandas.core.arrays import DatetimeArray
4545
from pandas.core.tools import datetimes as tools
4646
from pandas.core.tools.datetimes import start_caching_at
47+
from pandas.util.version import Version
4748

4849

4950
@pytest.fixture(params=[True, False])
@@ -810,11 +811,20 @@ def test_to_datetime_utc_true_with_series_datetime_ns(self, cache, date, dtype):
810811
tm.assert_series_equal(result, expected)
811812

812813
@td.skip_if_no("psycopg2")
813-
def test_to_datetime_tz_psycopg2(self, cache):
814+
def test_to_datetime_tz_psycopg2(self, request, cache):
814815

815816
# xref 8260
816817
import psycopg2
817818

819+
# https://www.psycopg.org/docs/news.html#what-s-new-in-psycopg-2-9
820+
request.node.add_marker(
821+
pytest.mark.xfail(
822+
Version(psycopg2.__version__.split()[0]) > Version("2.8.7"),
823+
raises=AttributeError,
824+
reason="psycopg2.tz is deprecated (and appears dropped) in 2.9",
825+
)
826+
)
827+
818828
# misc cases
819829
tz1 = psycopg2.tz.FixedOffsetTimezone(offset=-300, name=None)
820830
tz2 = psycopg2.tz.FixedOffsetTimezone(offset=-240, name=None)

0 commit comments

Comments
 (0)