Skip to content

Commit 8d939f7

Browse files
committed
allow tests to run locally but not on CI
Signed-off-by: Achal Shah <achals@gmail.com>
1 parent 751b613 commit 8d939f7

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

sdk/python/tests/integration/registration/test_sql_registry.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
import logging
15+
import os
1516
import sys
1617
from datetime import timedelta
1718

@@ -101,7 +102,8 @@ def mysql_registry():
101102

102103

103104
@pytest.mark.skipif(
104-
sys.platform == "darwin", reason="does not run on mac github actions"
105+
sys.platform == "darwin" and "GITHUB_REF" in os.environ,
106+
reason="does not run on mac github actions",
105107
)
106108
@pytest.mark.parametrize(
107109
"sql_registry", [lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
@@ -143,7 +145,8 @@ def test_apply_entity_success(sql_registry):
143145

144146

145147
@pytest.mark.skipif(
146-
sys.platform == "darwin", reason="does not run on mac github actions"
148+
sys.platform == "darwin" and "GITHUB_REF" in os.environ,
149+
reason="does not run on mac github actions",
147150
)
148151
@pytest.mark.parametrize(
149152
"sql_registry", [lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
@@ -217,7 +220,8 @@ def test_apply_feature_view_success(sql_registry):
217220

218221

219222
@pytest.mark.skipif(
220-
sys.platform == "darwin", reason="does not run on mac github actions"
223+
sys.platform == "darwin" and "GITHUB_REF" in os.environ,
224+
reason="does not run on mac github actions",
221225
)
222226
@pytest.mark.parametrize(
223227
"sql_registry", [lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
@@ -299,7 +303,8 @@ def location_features_from_push(inputs: pd.DataFrame) -> pd.DataFrame:
299303

300304

301305
@pytest.mark.skipif(
302-
sys.platform == "darwin", reason="does not run on mac github actions"
306+
sys.platform == "darwin" and "GITHUB_REF" in os.environ,
307+
reason="does not run on mac github actions",
303308
)
304309
@pytest.mark.parametrize(
305310
"sql_registry", [lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
@@ -421,7 +426,8 @@ def odfv1(feature_df: pd.DataFrame) -> pd.DataFrame:
421426

422427

423428
@pytest.mark.skipif(
424-
sys.platform == "darwin", reason="does not run on mac github actions"
429+
sys.platform == "darwin" and "GITHUB_REF" in os.environ,
430+
reason="does not run on mac github actions",
425431
)
426432
@pytest.mark.integration
427433
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)