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

ci(datasets): Run tensorflow tests separately from other dataset tests #377

Merged
merged 11 commits into from
Oct 6, 2023
7 changes: 5 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ jobs:
pip install ".[test]"
- name: pip freeze
run: pip freeze
- name: Run unit tests for Linux / all plugins
if: inputs.os != 'windows-latest'
- name: Run unit tests for Linux / kedro-airflow, kedro-docker, kedro-telemetry
if: inputs.os != 'windows-latest' && inputs.plugin != 'kedro-datasets'
run: make plugin=${{ inputs.plugin }} test
- name: Run unit tests for Linux / kedro-datasets
if: inputs.os != 'windows-latest' && inputs.plugin == 'kedro-datasets'
run: make dataset-tests
Comment on lines +52 to +57
Copy link
Contributor

@SajidAlamQB SajidAlamQB Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should leave a comment why this was split.

- name: Run unit tests for Windows / kedro-airflow, kedro-docker, kedro-telemetry
if: inputs.os == 'windows-latest' && inputs.plugin != 'kedro-datasets'
run: |
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ lint:
test:
cd $(plugin) && pytest tests --cov-config pyproject.toml --numprocesses 4 --dist loadfile

# Run test_tensorflow_model_dataset separately, because these tests are flaky when run as part of the full test-suite
dataset-tests:
cd kedro-datasets && pytest tests --cov-config pyproject.toml --numprocesses 4 --dist loadfile --ignore tests/tensorflow
cd kedro-datasets && pytest tests/tensorflow/test_tensorflow_model_dataset.py --no-cov

test-sequential:
cd $(plugin) && pytest tests --cov-config pyproject.toml

Expand Down
2 changes: 1 addition & 1 deletion kedro-datasets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ version = {attr = "kedro_datasets.__version__"}
[tool.coverage.report]
fail_under = 100
show_missing = true
omit = ["tests/*", "kedro_datasets/holoviews/*", "kedro_datasets/snowflake/*"]
omit = ["tests/*", "kedro_datasets/holoviews/*", "kedro_datasets/snowflake/*", "kedro_datasets/tensorflow/*"]
exclude_lines = ["pragma: no cover", "raise NotImplementedError"]

[tool.pytest.ini_options]
Expand Down