Skip to content

Commit 19bcacd

Browse files
committed
Update CI script.
1 parent e457d3a commit 19bcacd

45 files changed

Lines changed: 157 additions & 182 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/code_test_and_deploy.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,18 @@ jobs:
5757
run: |
5858
python -m pip install --upgrade pip
5959
pip install .[dev]
60-
- name: Test
60+
- name: Test All
6161
# run SSH tests only on Linux because Windows and macOS
6262
# are already run within a virtual container and so cannot
6363
# run Linux containers because nested containerisation is disabled.
64+
- name: Test SSH (Linux only)
65+
if: runner.os == 'Linux'
6466
run: |
65-
if [ "$RUNNER_OS" == "Linux" ]; then
66-
sudo service mysql stop # free up port 3306 for ssh tests: https://github.com/orgs/community/discussions/25550
67-
pytest -k "test_combinations_ssh_transfer or test_ssh_setup"
68-
else
69-
pytest -k "not test_combinations_ssh_transfer and not test_ssh_setup"
70-
fi
67+
sudo service mysql stop # free up port 3306 for ssh tests
68+
pytest tests/tests_transfers/ssh
69+
- name: Test All
70+
run: |
71+
pytest --ignore tests/tests_transfers/ssh
7172
7273
build_sdist_wheels:
7374
name: Build source distribution

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ select = ["I", "E", "F", "TCH", "TID252"]
107107

108108
[tool.ruff.lint.per-file-ignores]
109109
"__init__.py" = ["F401"]
110+
"tests/**/*" = ["TID252"]
110111

111112
[tool.ruff.lint.mccabe]
112113
max-complexity = 18

tests/__init__.py

Whitespace-only changes.

tests/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import warnings
22

33
import pytest
4-
import test_utils
54

65
from datashuttle import DataShuttle
76

7+
from . import test_utils
8+
89
TEST_PROJECT_NAME = "test_project"
910

1011

tests/conftest.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

tests/quick_make_project.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/test_utils.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from pathlib import Path
1111

1212
import yaml
13-
from file_conflicts_pathtable import get_pathtable
1413

1514
from datashuttle import DataShuttle
1615
from datashuttle.configs import canonical_configs, canonical_folders
@@ -159,19 +158,6 @@ def make_test_path(base_path, local_or_central, test_project_name):
159158
return Path(base_path) / local_or_central / test_project_name
160159

161160

162-
def create_all_pathtable_files(pathtable):
163-
""" """
164-
for i in range(pathtable.shape[0]):
165-
filepath = pathtable["base_folder"][i] / pathtable["path"][i]
166-
filepath.parents[0].mkdir(parents=True, exist_ok=True)
167-
write_file(filepath, contents="test_entry")
168-
169-
170-
def quick_create_project(base_path):
171-
pathtable = get_pathtable(base_path)
172-
create_all_pathtable_files(pathtable)
173-
174-
175161
# -----------------------------------------------------------------------------
176162
# Test Configs
177163
# -----------------------------------------------------------------------------

tests/tests_integration/__init__.py

Whitespace-only changes.

tests/tests_integration/test_configs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import os
22

33
import pytest
4-
import test_utils
5-
from base import BaseTest
64

75
from datashuttle import DataShuttle
86
from datashuttle.utils import getters
97
from datashuttle.utils.custom_exceptions import ConfigError
108

9+
from .. import test_utils
10+
from ..base import BaseTest
11+
1112

1213
class TestConfigs(BaseTest):
1314
# Test Errors

tests/tests_integration/test_create_folders.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
from os.path import join
66

77
import pytest
8-
import test_utils
9-
from base import BaseTest
108

119
from datashuttle.configs import canonical_configs, canonical_folders
1210
from datashuttle.configs.canonical_tags import tags
1311

12+
from .. import test_utils
13+
from ..base import BaseTest
14+
1415

1516
class TestCreateFolders(BaseTest):
1617

0 commit comments

Comments
 (0)