Skip to content

Commit 70efb67

Browse files
committed
use service container for linux CI
1 parent 5791087 commit 70efb67

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ jobs:
140140

141141
moto:
142142
image: motoserver/moto:5.0.27
143-
env:
144-
AWS_ACCESS_KEY_ID: foobar_key
145-
AWS_SECRET_ACCESS_KEY: foobar_secret
146143
ports:
147144
- 5000:5000
148145

pandas/tests/io/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
import pytest
44

5+
from pandas.compat import (
6+
is_ci_environment,
7+
is_platform_arm,
8+
is_platform_mac,
9+
is_platform_windows,
10+
)
511
import pandas.util._test_decorators as td
612

713
import pandas.io.common as icom
@@ -53,6 +59,11 @@ def aws_credentials(monkeysession):
5359

5460
@pytest.fixture(scope="session")
5561
def moto_server(aws_credentials):
62+
# use service container for Linux on GitHub Actions
63+
if is_ci_environment() and not (
64+
is_platform_mac() or is_platform_arm() or is_platform_windows()
65+
):
66+
return "http://localhost:5000"
5667
moto_server = pytest.importorskip("moto.server")
5768
server = moto_server.ThreadedMotoServer(port=0)
5869
server.start()

0 commit comments

Comments
 (0)