mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 23:10:42 +01:00
github actions tests: initial (#4469)
* github actions tests: initial * build: tests: add codecov action
This commit is contained in:
@@ -208,9 +208,14 @@ def test_add_file_in_dir(tmp_dir, dvc):
|
||||
),
|
||||
(pytest.lazy_fixture("gs"), "md5", "8c7dd922ad47494fc02c388e12c00eac"),
|
||||
(
|
||||
pytest.lazy_fixture("hdfs"),
|
||||
"checksum",
|
||||
"000002000000000000000000a86fe4d846edc1bf4c355cb6112f141e",
|
||||
pytest.param(
|
||||
pytest.lazy_fixture("hdfs"),
|
||||
"checksum",
|
||||
"000002000000000000000000a86fe4d846edc1bf4c355cb6112f141e",
|
||||
marks=pytest.mark.xfail(
|
||||
reason="https://github.com/iterative/dvc/issues/4418"
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
indirect=["workspace"],
|
||||
|
||||
+30
-14
@@ -1,9 +1,10 @@
|
||||
import os
|
||||
import platform
|
||||
|
||||
import pytest
|
||||
|
||||
from dvc import api
|
||||
from dvc.exceptions import FileMissingError, OutputNotFoundError
|
||||
from dvc.exceptions import DvcException, FileMissingError, OutputNotFoundError
|
||||
from dvc.path_info import URLInfo
|
||||
from dvc.utils.fs import remove
|
||||
from tests.unit.tree.test_repo import make_subrepo
|
||||
@@ -15,10 +16,16 @@ cloud_names = [
|
||||
"gdrive",
|
||||
"oss",
|
||||
"ssh",
|
||||
"hdfs",
|
||||
"http",
|
||||
]
|
||||
clouds = [pytest.lazy_fixture(cloud) for cloud in cloud_names]
|
||||
clouds = [pytest.lazy_fixture(cloud) for cloud in cloud_names] + [
|
||||
pytest.param(
|
||||
pytest.lazy_fixture("hdfs"),
|
||||
marks=pytest.mark.xfail(
|
||||
reason="https://github.com/iterative/dvc/issues/4418"
|
||||
),
|
||||
)
|
||||
]
|
||||
all_clouds = [pytest.lazy_fixture("local_cloud")] + clouds
|
||||
|
||||
# `lazy_fixture` is confusing pylint, pylint: disable=unused-argument
|
||||
@@ -69,17 +76,26 @@ def test_open(tmp_dir, dvc, remote):
|
||||
@pytest.mark.parametrize(
|
||||
"cloud",
|
||||
[
|
||||
pytest.lazy_fixture(cloud)
|
||||
for cloud in [
|
||||
"real_s3", # NOTE: moto's s3 fails in some tests
|
||||
"gs",
|
||||
"azure",
|
||||
"gdrive",
|
||||
"oss",
|
||||
"ssh",
|
||||
"hdfs",
|
||||
"http",
|
||||
]
|
||||
*[
|
||||
pytest.lazy_fixture(cloud)
|
||||
for cloud in [
|
||||
"real_s3", # NOTE: moto's s3 fails in some tests
|
||||
"gs",
|
||||
"azure",
|
||||
"gdrive",
|
||||
"oss",
|
||||
"hdfs",
|
||||
"http",
|
||||
]
|
||||
],
|
||||
pytest.param(
|
||||
pytest.lazy_fixture("ssh"),
|
||||
marks=pytest.mark.xfail(
|
||||
raises=DvcException,
|
||||
condition=platform.system() == "Windows",
|
||||
reason="https://github.com/iterative/dvc/issues/4418",
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_open_external(erepo_dir, cloud):
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import platform
|
||||
import stat
|
||||
|
||||
import configobj
|
||||
@@ -163,6 +164,10 @@ class TestCmdCacheDir(TestDvc):
|
||||
config = configobj.ConfigObj(self.dvc.config.files["repo"])
|
||||
self.assertEqual(config["cache"]["dir"], dname.replace("\\", "/"))
|
||||
|
||||
@pytest.mark.skipif(
|
||||
platform.system() == "Darwin",
|
||||
reason="https://github.com/iterative/dvc/issues/4418",
|
||||
)
|
||||
def test_relative_path(self):
|
||||
tmpdir = self.mkdtemp()
|
||||
dname = relpath(tmpdir)
|
||||
|
||||
@@ -121,7 +121,12 @@ def test_import_url_with_no_exec(tmp_dir, dvc, erepo_dir):
|
||||
pytest.lazy_fixture("local_cloud"),
|
||||
pytest.lazy_fixture("s3"),
|
||||
pytest.lazy_fixture("gs"),
|
||||
pytest.lazy_fixture("hdfs"),
|
||||
pytest.param(
|
||||
pytest.lazy_fixture("hdfs"),
|
||||
marks=pytest.mark.xfail(
|
||||
reason="https://github.com/iterative/dvc/issues/4418"
|
||||
),
|
||||
),
|
||||
pytest.param(
|
||||
pytest.lazy_fixture("ssh"),
|
||||
marks=pytest.mark.skipif(
|
||||
|
||||
@@ -386,10 +386,15 @@ def test_run_overwrite_preserves_meta_and_comment(tmp_dir, dvc, run_copy):
|
||||
"37b51d194a7513e45b56f6524f2d51f2",
|
||||
),
|
||||
(
|
||||
pytest.lazy_fixture("hdfs"),
|
||||
"checksum",
|
||||
"0000020000000000000000003dba826b9be9c6a8e2f8310a770555c4",
|
||||
"00000200000000000000000075433c81259d3c38e364b348af52e84d",
|
||||
pytest.param(
|
||||
pytest.lazy_fixture("hdfs"),
|
||||
"checksum",
|
||||
"0000020000000000000000003dba826b9be9c6a8e2f8310a770555c4",
|
||||
"00000200000000000000000075433c81259d3c38e364b348af52e84d",
|
||||
marks=pytest.mark.xfail(
|
||||
reason="https://github.com/iterative/dvc/issues/4418"
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
indirect=["workspace"],
|
||||
|
||||
@@ -6,7 +6,18 @@ from dvc.dvcfile import Dvcfile
|
||||
from tests.unit.tree.test_repo import make_subrepo
|
||||
|
||||
|
||||
@pytest.mark.parametrize("cached", [True, False])
|
||||
@pytest.mark.parametrize(
|
||||
"cached",
|
||||
[
|
||||
True,
|
||||
pytest.param(
|
||||
False,
|
||||
marks=pytest.mark.skip(
|
||||
reason="https://github.com/iterative/dvc/issues/4418"
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_update_import(tmp_dir, dvc, erepo_dir, cached):
|
||||
gen = erepo_dir.dvc_gen if cached else erepo_dir.scm_gen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user