Skip to content
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

Skip some tests automatically in Github actions #558

Merged
merged 8 commits into from
Jan 15, 2025
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
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Test

env:
skip_large_tests: true

on:
push:
branches:
Expand Down
66 changes: 50 additions & 16 deletions tests/test_datasets/test_internal_datasets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import json
import os
import shutil

import numpy as np
Expand Down Expand Up @@ -87,7 +89,9 @@ def test_not_present_part():
pd.to_datetime("2011-01-01 00:15:00"),
pd.to_datetime("2015-01-01 00:00:00"),
("train", "test"),
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
(
"m4_hourly",
Expand All @@ -102,7 +106,9 @@ def test_not_present_part():
0,
9932,
("train", "test"),
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
(
"m4_weekly",
Expand All @@ -117,7 +123,9 @@ def test_not_present_part():
0,
2811,
("train", "test"),
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
(
"m4_quarterly",
Expand All @@ -139,23 +147,29 @@ def test_not_present_part():
pd.to_datetime("2008-01-01 00:00:00"),
pd.to_datetime("2009-03-30 23:50:00"),
("train", "test"),
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
pytest.param(
"traffic_2008_hourly",
(10896 + 24, 963),
pd.to_datetime("2008-01-01 00:00:00"),
pd.to_datetime("2009-03-30 23:00:00"),
("train", "test"),
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
pytest.param(
"traffic_2015_hourly",
(17520 + 24, 862),
pd.to_datetime("2015-01-01 00:00:00"),
pd.to_datetime("2016-12-31 23:00:00"),
("train", "test"),
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
(
"m3_monthly",
Expand Down Expand Up @@ -212,7 +226,9 @@ def test_not_present_part():
pd.to_datetime("2020-01-01 00:10:00"),
pd.to_datetime("2021-01-01 00:00:00"),
("train", "test"),
marks=pytest.mark.skip(reason="There is a problem with certificates during loading the dataset."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
(
"ETTm1",
Expand Down Expand Up @@ -248,7 +264,9 @@ def test_not_present_part():
pd.to_datetime("2006-12-16 17:24:00"),
pd.to_datetime("2010-11-26 21:02:00"),
tuple(),
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
(
"australian_wine_sales_monthly",
Expand Down Expand Up @@ -364,31 +382,43 @@ def test_list_datasets():
[
pytest.param(
"electricity_15T",
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
"m4_hourly",
pytest.param(
"m4_daily",
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
"m4_weekly",
pytest.param(
"m4_monthly",
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
"m4_quarterly",
"m4_yearly",
pytest.param(
"traffic_2008_10T",
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
pytest.param(
"traffic_2008_hourly",
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
pytest.param(
"traffic_2015_hourly",
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
"m3_monthly",
"m3_quarterly",
Expand All @@ -399,15 +429,19 @@ def test_list_datasets():
"tourism_yearly",
pytest.param(
"weather_10T",
marks=pytest.mark.skip(reason="There is a problem with certificates during loading the dataset."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
"ETTm1",
"ETTm2",
"ETTh1",
"ETTh2",
pytest.param(
"IHEPC_T",
marks=pytest.mark.skip(reason="Dataset is too large for testing in GitHub."),
marks=pytest.mark.skipif(
json.loads(os.getenv("skip_large_tests", "false")), reason="Dataset is too large for testing in GitHub."
),
),
"australian_wine_sales_monthly",
],
Expand Down
Loading
Loading