Skip to content

Commit 07826b8

Browse files
authored
Run tests marked with notebook marker in examples workflow (#1146)
* Run tf notebook tests if tf-examples * same for gpu tests * trigger example tests * Same for 'chagned' workflows * change marker: example -> examples * more example -> examples
1 parent 92833fa commit 07826b8

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

.github/workflows/gpu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
if [[ "${{ github.ref }}" != 'refs/heads/main' ]]; then
3535
extra_pytest_markers="and changed"
3636
fi
37-
cd ${{ github.workspace }}; PYTEST_MARKERS="unit and not (example or integration) $extra_pytest_markers" MERLIN_BRANCH=$branch COMPARE_BRANCH=${{ github.base_ref }} tox -e py38-gpu
37+
cd ${{ github.workspace }}; PYTEST_MARKERS="unit and not (examples or integration or notebook) $extra_pytest_markers" MERLIN_BRANCH=$branch COMPARE_BRANCH=${{ github.base_ref }} tox -e py38-gpu
3838
3939
tests-examples:
4040
runs-on: 1GPU
@@ -55,4 +55,4 @@ jobs:
5555
if [[ "${{ github.ref }}" != 'refs/heads/main' ]]; then
5656
extra_pytest_markers="and changed"
5757
fi
58-
cd ${{ github.workspace }}; PYTEST_MARKERS="example $extra_pytest_markers" MERLIN_BRANCH=$branch COMPARE_BRANCH=${{ github.base_ref }} tox -e py38-gpu
58+
cd ${{ github.workspace }}; PYTEST_MARKERS="(examples or notebook) $extra_pytest_markers" MERLIN_BRANCH=$branch COMPARE_BRANCH=${{ github.base_ref }} tox -e py38-gpu

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ tests-changed:
2222
coverage html --include 'merlin/models/*'
2323

2424
tests-tf:
25-
coverage run -m pytest --durations=100 --dist=loadfile --numprocesses=auto -rsx tests -m "tensorflow and not (integration or example)" || exit 1
25+
coverage run -m pytest --durations=100 --dist=loadfile --numprocesses=auto -rsx tests -m "tensorflow and not (integration or examples or notebook)" || exit 1
2626
coverage report --include 'merlin/models/*'
2727
coverage html --include 'merlin/models/*'
2828

2929
tests-tf-examples:
30-
coverage run -m pytest -rsx tests -m "tensorflow and example" || exit 1
30+
coverage run -m pytest -rsx tests -m "tensorflow and (examples or notebook)" || exit 1
3131
coverage report --include 'merlin/models/*'
3232
coverage html --include 'merlin/models/*'
3333

@@ -37,12 +37,12 @@ tests-tf-integration:
3737
coverage html --include 'merlin/models/*'
3838

3939
tests-tf-changed:
40-
coverage run -m pytest --durations=100 --dist=loadfile --numprocesses=auto -rsx tests -m "tensorflow and changed and not (integration or example) or always" || exit 1
40+
coverage run -m pytest --durations=100 --dist=loadfile --numprocesses=auto -rsx tests -m "tensorflow and changed and not (integration or examples or notebook) or always" || exit 1
4141
coverage report --include 'merlin/models/*'
4242
coverage html --include 'merlin/models/*'
4343

4444
tests-tf-examples-changed:
45-
coverage run -m pytest -rsx tests -m "tensorflow and changed and example" || exit 1
45+
coverage run -m pytest -rsx tests -m "tensorflow and changed and (examples or notebook)" || exit 1
4646
coverage report --include 'merlin/models/*'
4747
coverage html --include 'merlin/models/*'
4848

@@ -121,4 +121,4 @@ docs:
121121
cd docs/build/html/ && python -m http.server
122122

123123

124-
.PHONY: install tests lint tests-tf tests-tf-examples tests-torch tests-implicit tests-lightfm tests-datasets dist clean docstrings docs
124+
.PHONY: install tests lint tests-tf tests-tf-examples tests-torch tests-implicit tests-lightfm tests-datasets dist clean docstrings docs

examples/01-Getting-started.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"metadata": {},
88
"outputs": [],
99
"source": [
10-
"# Copyright 2022 NVIDIA Corporation. All Rights Reserved.\n",
10+
"# Copyright 2023 NVIDIA Corporation. All Rights Reserved.\n",
1111
"#\n",
1212
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
1313
"# you may not use this file except in compliance with the License.\n",

merlin/models/utils/ci_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"lightfm": "lightfm",
2626
"xgb": "xgboost",
2727
}
28-
OTHER_MARKERS = {"unit", "integration", "example", "datasets", "horovod", "transformers"}
28+
OTHER_MARKERS = {"unit", "integration", "examples", "datasets", "horovod", "transformers"}
2929
SHARED_MODULES = {
3030
"/datasets/",
3131
"/models/config/",

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
markers =
33
version: mark as testing the version number
44
notebook: mark as testing notebooks
5-
example: mark as testing examples
5+
examples: mark as testing examples
66
datasets: mark as testing datasets
77
integration: mark as an integration test
88
unit: mark as a unit test

0 commit comments

Comments
 (0)