Skip to content

Commit

Permalink
setup up CI for memory checks
Browse files Browse the repository at this point in the history
  • Loading branch information
wochinge committed Mar 24, 2021
1 parent 9d7f2b4 commit ae2a586
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ jobs:
- test-nlu-predictors
- test-full-model-training
- test-other-unit-tests
- test-performance
os: [ ubuntu-latest, windows-latest ]
python-version: [ 3.6, 3.7, 3.8 ]

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ test-full-model-training: test-marker
test-other-unit-tests: PYTEST_MARKER=category_other_unit_tests
test-other-unit-tests: test-marker

test-other-unit-tests: PYTEST_MARKER=category_performance
test-other-unit-tests: test-marker

test-marker: clean
# OMP_NUM_THREADS can improve overall performance using one thread by process (on tensorflow), avoiding overload
OMP_NUM_THREADS=1 poetry run pytest tests -n $(JOBS) --cov rasa -m "$(PYTEST_MARKER)" --ignore $(INTEGRATION_TEST_FOLDER)
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ markers =
models (instead of single policies / components).
category_other_unit_tests: Default marker for unit tests which have no
`category_` marker applied to them.
category_performance: Marker for performance tests (e.g. speed or detecting
memory leaks).
# see https://pypi.org/project/pytest-timeout/
timeout = 120
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
Path("tests", "core", "test_training.py").absolute(),
Path("tests", "core", "test_examples.py").absolute(),
],
"category_performance": [Path("tests", "test_memory_leak.py").absolute()],
}


Expand Down

0 comments on commit ae2a586

Please sign in to comment.