Skip to content

CI: Merge database workflow into posix workflow #45060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 0 additions & 123 deletions .github/workflows/database.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
strategy:
matrix:
settings: [
[actions-38-db-min.yaml, "((not slow and not network and not clipboard) or (single and db))", "", "", "", "", ""],
[actions-38-db.yaml, "((not slow and not network and not clipboard) or (single and db))", "", "", "", "", ""],
[actions-38-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
[actions-38-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
[actions-38.yaml, "not slow and not clipboard", "", "", "", "", ""],
Expand Down Expand Up @@ -52,7 +54,35 @@ jobs:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.settings[0] }}
cancel-in-progress: true

services:
mysql:
image: mysql
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: pandas
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306

postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pandas
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

moto:
image: motoserver/moto
env:
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/arrays/floating/test_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pandas.compat import (
is_platform_windows,
np_version_under1p19,
np_version_under1p20,
)

import pandas as pd
Expand Down Expand Up @@ -56,7 +56,7 @@ def test_floating_array_disallows_float16(request):
with pytest.raises(TypeError, match=msg):
FloatingArray(arr, mask)

if np_version_under1p19 or (
if np_version_under1p20 or (
locale.getlocale()[0] != "en_US" and not is_platform_windows()
):
# the locale condition may need to be refined; this fails on
Expand Down
12 changes: 11 additions & 1 deletion pandas/tests/tools/test_to_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from pandas.core.arrays import DatetimeArray
from pandas.core.tools import datetimes as tools
from pandas.core.tools.datetimes import start_caching_at
from pandas.util.version import Version


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

@td.skip_if_no("psycopg2")
def test_to_datetime_tz_psycopg2(self, cache):
def test_to_datetime_tz_psycopg2(self, request, cache):

# xref 8260
import psycopg2

# https://www.psycopg.org/docs/news.html#what-s-new-in-psycopg-2-9
request.node.add_marker(
pytest.mark.xfail(
Version(psycopg2.__version__.split()[0]) > Version("2.8.7"),
raises=AttributeError,
reason="psycopg2.tz is deprecated (and appears dropped) in 2.9",
)
)

# misc cases
tz1 = psycopg2.tz.FixedOffsetTimezone(offset=-300, name=None)
tz2 = psycopg2.tz.FixedOffsetTimezone(offset=-240, name=None)
Expand Down